Name
div
Synopsis
<div>...</div>
Denotes a generic “division” within the document. This element
is used to add a customizable block element to the document. The
content within the div
element is
typically given a name via a class
or id
attribute and then formatted
with style sheets.
Attributes
Core(id
,
class
, style
, title
),
Internationalization,
Events
align="center
|left
|right"
Deprecated. Aligns the text within the element to the left, right, or center of the page.
Example
<div id="sidebar">Content of sidebar...</div>
Get Web Design in a Nutshell, 3rd 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.