Sunday, January 26, 2014

HTML division tag

The division tags do nothing.  They are just defined container to divide the content and each section can be manipulated by style sheet later.  For example, the content can be divided into header, main body and footer.  Each of this section is defined in a div and their presentation (e.g. location, border, font, colr etc) can be specified by style sheet individually.

Each division is assigned with an ID.  For example

This is section 1


Once the division are named, they can be refered to in the accompanied style sheet.  For example,

#section1 {font-family : Ariel; font-size : 12pt ; }

The preceding "#" in the style sheet indicate to the browser to match this with an id attribute in the body content.

The span tag is functionally similar to div tag except span is used to define the style for a segment of content in a section


No comments: