div ElementThe div element is a block-level element declared by the XHTML 1.1 Text Module (Block Structural)
Elements in the Text Module are:span | br (Inline Structural Support Module)em | strong | q | cite | abbr | acronym | code | var | kbd | samp | dfn (Inline Phrasal Support Module)div | p (Block Structural Support Module)h1 - h6 | blockquote | pre | address (Block Phrasal Support Module)
The div element is used as a general block level container, where content can be
grouped without there being any intrinsic significance to the tag. Attributes of the div element
can be used to assign a class or
id (for reference within a style sheet or script) or to add a
title. Another useful attribute is
xml:lang, which allows a particular language to be
associated with the content of the div.
An example of the use of a div element:
See also the span element, which is the inline equivalent of div.
There are no #REQUIRED attributes on the div element.
There are no specific attributes declared on the div element.
div element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
div element is:
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
divabbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1 - h6, kbd, p, pre, q, samp, span, strong, varadl, ol, ultablebutton, fieldset, form, input, label, select, textareaimgb, big, hr, i, small, sub, sup, ttmapnoscript, scriptdel, insbdoobjectrubydivbodyblockquote, divdd, litd, thbutton, fieldset, formmapnoscriptdel, insobject