From http://www.w3schools.com (Copyright Refsnes Data)
ExampleA section in a document that will be displayed in green:
|
The <div> tag defines a division or a section in an HTML document.
The <div> tag is often used to group block-elements to format them with styles.
The <div> tag is supported in all major browsers.
The "align" attribute of the div element was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.
Tip: The div element is very often used with CSS to layout a web page.
Note: Browsers usually place a line break before and after the div element.
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute | Value | Description | DTD |
---|---|---|---|
align | left right center justify |
Deprecated. Use styles instead. How to align the text in the div element. |
TF |
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard Attributes.
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
From http://www.w3schools.com (Copyright Refsnes Data)