![]() |
Lesson 9
The DIV element is similar to the element in function, with the main difference being that DIV (short for "division") is a block-level element. DIV may contain paragraphs, headings, tables, and even other divisions. This makes DIV ideal for marking different classes of containers, such as a chapter, abstract, or note. For example:
<DIV
CLASS=note>
<H1>Divisions</H1>
<P>The DIV element is
defined in HTML 3.2, but only the ALIGN attribute is permitted in HTML 3.2. HTML
4.0 adds the CLASS, STYLE, and ID attributes, among
others.</P>
<P>Since DIV may contain other block-level
containers, it is useful for marking large sections of a document, such as this
note.</P>
<P>The closing tag is
required.</P>
</DIV>
![]() |