• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter Seven. Tighter, Firmer Pages Gua... > div, id, and Other Assistants

div, id, and Other Assistants

This chapter and those that follow make much reference to the div element and the id attribute. Used correctly, div is the Hamburger Helper of structured markup, whereas id is an amazing little tool that permits you to write highly compact XHTML, apply CSS wisely, and add sophisticated behavior to your site via the standard Document Object Model (DOM). The W3C, in “The Global Structure of an HTML Document,” defines these elements and two other important HTML/XHTML components thusly:

The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content. Thus, authors may use these elements in conjunction with style sheets…to tailor HTML to their own needs and tastes (http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.4).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint