DIV - Generic Block-level Container

Syntax <DIV>...</DIV>
Attribute Specifications
Contents ,
Contained in , , , , , , , DIV, , , , , , , , , , ,

The DIV element defines a generic block-level container, allowing authors to provide style or language information to blocks of content. The element may contain any or element, including another DIV.

The DIV element is most useful in combination with the , , or attributes. For example, a navigation bar could be contained within a DIV marked as CLASS=navbar, allowing the author to use to easily change the background of all navigation bars on a site, or to eliminate navigation bars when printing.

The ALIGN attribute suggests the horizontal alignment for the content of the division on visual browsers. Possible values are left, right, center, and justify. is a slightly better-supported alias for <DIV ALIGN=center>, though both methods of centering are deprecated in favor of , which provide greater flexibility in suggesting alignment.

is a text-level equivalent of DIV for use within and .

More Information