HTML and CSS Reference
Marking a Section with the div Element
The structural elements are part of the current specifi cations for HTML5, but they are
not part of HTML 4.01 or XHTML. Pages written to those languages instead use the div
element to identify different page divisions. The syntax of the div element is
<div id=” id ”>
where id is a unique name assigned to the division and content is page content con-
tained within the division. While not required, the id attribute is useful to distinguish
one div element from another. This becomes particularly important if you apply different
styles to different page divisions.
Figure 1-12 shows how the same page layout marked up using structural elements
under HTML5 would be marked up in HTML 4.01 using the div element.
Structural elements in HTML5 and HTML 4.01