The DIV element is a generic, catch-all Block
Formatting element with an implied line break before and after. Within
the realm of Style Sheets, this element is nestable to allow hierarchies
of sections, subsections or chapters to be defined. This nesting ability
also allows for powerful
Style Sheet[-->Index DOT Css] mechanisms to be applied.
This attribute helps an author in situations with floating objects (images,
tables, etc.) produced through the Left and
Right ALIGN attributes. It allows content to stop being
flowed around the floated element.
[DEFAULT - No special line breaking
effects are applied relative to the floating element.] Left [breaks line after this element
and moves down vertically until the left margin is clear of floated objects.] Right [breaks line after this element
and moves down vertically until the right margin is clear of floated objects.] All [breaks line after this element
and moves down vertically until both margins are clear of floated objects.]
This attribute makes the contents of this element behave just like the
Netscape MULTICOL element. It indicates
the number of columns the contained content will be split into. The
browser should try to evenly distribute the content evenly across each
of the columns in order to achieve roughly the same column height.
This attribute controls the amount of pixel space between columns if the
COLS attribute is greater than one, just as the corresponding attribute
for the MULTICOL element does -
otherwise this attribute is ignored.
Values: Specified as positive
integers with the default being 10
This attribute specifies whether or not the content of the element will
use normal HTML linebreaking conventions. If False, normal linebreaking
behavior is used. If set to True, the element will not wrap to the
rendering viewport unless explicit linebreaking elements are added.
May also be used as a standalone attribute, in which case the value is
treated as TRUE.
As used by Opera, This attribute explicitly specifies the width of this
block element in pixels. As used by Netscape, it defines the width of a
multiple-column apparatus defined with the COLS and GUTTER attributes
present. See the MULTICOL element page
for details on the usage of this attribute.
Values: Positive integer pixel values or a
percentage of the overall screen width.
The DIV element is an all-purpose, generalized HTML Block
Structure. Use this element when you wish to define a block or section of
Styled text, and SPAN when you wish to create a
generalized in-line Character Formatting element.
Note that the DIV element was not listed in the Block
Formatting section, even though it is a Block Level element. DIV is a
generic element and does not attach any semantic meaning. It is of greatest use
when working with Style Sheets, so it is grouped with other elements of this category.
DIV CLASSes can be nested. This allows for more powerful Style Sheet mechanisms.
An author can abuse this capability by using negative margin values to create
content that overlaps other content. This effect can be achieved more reliably
using properties specified in the CSS
positioning draft. The design possibilities using overlapping content
are enormous - but understanding the issues of such constructs is also essential.
Use of the CENTER element to center align text
in a block is still recommended slightly over use of DIV because more older
browsers support it. This difference in support is quickly changing though.
Along the same lines, HTML 3.2
classifies <center> as a shorthand notation
This effectively makes the CENTER tag a "subset" of DIV.
DTD NOTE: Alignment attributes do not react very well
with the MULTICOL element.
The 'justify' value of the ALIGN attribute is currently only supported in
Netscape and Internet Explorer, versions 4.0 Beta 2 and above.
Netscape Usage Note: The usage of DIV as a substitute
for the MULTICOL element does not appear to have ever been advertised by
Netscape. I only found this information by looking through the Mozilla source.