Name
div — HTML 4.01 | HTML5
Synopsis
<div> . . . </div>
Denotes a generic “division” within the flow of the document.
Elements contained within a div
are
treated as a semantic group. The div
element is typically given meaning with
the class
, id
, title
, or lang
attributes, which also allow it to be
accessible to scripts and selected in style sheets.
Start/End Tags
Required/Required
Attributes
Core, Internationalization, Events, HTML5 Global Attributes
align="center
|left
|right"
Deprecated. Not in HTML5. Aligns the text within the element to the left, right, or center of the page.
Example
<div id="
summary">
<h1>In Closing</h1> <p>We can summarize as follows...</p></div>
Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.