Your SlideShare is downloading. ×
www.it-ebooks.info
HTML & CSS:The Complete Reference,Fifth Editionwww.it-ebooks.info
About the AuthorThomas A. Powell (tpowell@pint.com) is a long-timeindustry veteran. After an early stint at CERFnet in the...
HTML & CSS:The Complete Reference,Fifth EditionThomas A. PowellNew York Chicago San FranciscoLisbon London Madrid Mexico C...
Copyright © 2010 by The McGraw-Hill Companies. All rights reserved. Except as permitted under the United States Copyright ...
Contents at a GlancePart I Core Markup1 Traditional HTML and XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
This page intentionally left blankwww.it-ebooks.info
ContentsAcknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx...
viii HTML & CSS: The Complete Referenceviii HTML & CSS: The Complete ReferenceHTML5: Embracing the Reality of Web Markup ....
3 HTML and XHTML Element Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Flavors of HTML and XHTML ...
x HTML & CSS: The Complete Referencex HTML & CSS: The Complete Reference<address> (Address) . . . . . . . . . . . . . . . ...
<hr> (Horizontal Rule) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<html> (HTML Document)...
xii HTML & CSS: The Complete Referencexii HTML & CSS: The Complete Reference<spacer> (Extra Space) . . . . . . . . . . . ....
Document Structure and CSS Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468!important Override . . ...
xiv HTML & CSS: The Complete Referencexiv HTML & CSS: The Complete Referencebackground-repeat . . . . . . . . . . . . . . ...
margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581margin-b...
xvi HTML & CSS: The Complete Referencexvi HTML & CSS: The Complete ReferenceImplemented CSS3 and Browser-Specific Features ...
marquee-play-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678marquee-speed . . ...
xviii HTML & CSS: The Complete Referencexviii HTML & CSS: The Complete Referencetransform-origin . . . . . . . . . . . . ....
CSS Color Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773CSS ...
This page intentionally left blankwww.it-ebooks.info
AcknowledgmentsThe fifth edition of this book might as well be the first edition of a brand-new book.The HTML5 specificati...
xxii HTML & CSS: The Complete ReferenceFinally, to my friends and family who tried to give me space to write this thing, y...
I n t r o d u c t i o n xxiiiIntroductionThe fifth edition of this book represents a significant change in structure and c...
This page intentionally left blankwww.it-ebooks.info
ICore Markup CHAPTER 1Traditional HTMLand XHTMLCHAPTER 2Introducing HTML5CHAPTER 3HTML and XHTMLElement ReferencePARTwww.i...
This page intentionally left blankwww.it-ebooks.info
1Traditional HTML and XHTMLMarkup languages are ubiquitous in everyday computing. Although you may notrealize it, word pro...
4 P a r t I : C o r e M a r k u p4 P a r t I : C o r e M a r k u pWhen a Web browser reads a document that has HTML markup...
C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 5C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T...
6 P a r t I : C o r e M a r k u p6 P a r t I : C o r e M a r k u pA graphical overview of the HTML markup syntax shown so ...
C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 7C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T...
8 P a r t I : C o r e M a r k u p8 P a r t I : C o r e M a r k u p• The <h1> and </h1> header tag pair indicates a headlin...
C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 9C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T...
10 P a r t I : C o r e M a r k u p10 P a r t I : C o r e M a r k u pOnce you get the hang of markup production, you’ll see...
C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 11C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H ...
12 P a r t I : C o r e M a r k u p12 P a r t I : C o r e M a r k u pOn the Web server, you most likely will use the .html ...
C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 13C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H ...
14 P a r t I : C o r e M a r k u p14 P a r t I : C o r e M a r k u pHTML and XHTML: Version HistorySince its initial intro...
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Html  css_the_complete_reference_5th_edition
Upcoming SlideShare
Loading in...5
×

Html css_the_complete_reference_5th_edition

1,665

Published on

libro de css
HTML & CSS:
The Complete Reference,
Fifth Edition
Thomas A. Powell

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,665
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
98
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Html css_the_complete_reference_5th_edition"

  1. 1. www.it-ebooks.info
  2. 2. HTML & CSS:The Complete Reference,Fifth Editionwww.it-ebooks.info
  3. 3. About the AuthorThomas A. Powell (tpowell@pint.com) is a long-timeindustry veteran. After an early stint at CERFnet in theearly ‘90s, he founded Powell Internet Consulting (laterrenamed PINT) in 1994, a Web design and consulting servicesfirm. Today, PINT (pint.com) provides Web development,design, and consulting services to large and small corporationsall over the United States in a variety of industries.Beyond his involvement at PINT, Thomas is heavilyinvolved in the academic community. He developed theUniversity of California, San Diego Extension Web Publishingprogram in the late 1990s and continues to teach classes therein Web development and design. He is also an instructor forthe UCSD Computer Science Department, where he teachesclasses in Web development and the theory of programminglanguages.Mr. Powell is well published, and his work has appearedin numerous trade publications. He continues to publishregularly in Network World. He also has published numerousbooks on Web technology and design, including Ajax: TheComplete Reference, JavaScript: The Complete Reference, andmany others. His books have been translated into over12 languages and are used around the world both in industryand college settings.About the Technical EditorJames H. (Jim) Pence is a full-time writer, editor, speaker,singer, and performance chalk artist. Jim broke into bookpublishing in 2001 with How to Do Everything with HTML,a how-to book on Web authoring, written “by a nontechie fornontechies,” and published by McGraw-Hill Professional. Hefollowed this book the same year with another book forMcGraw-Hill: Cascading Style Sheets: A Beginner’s Guide.McGraw-Hill published a second edition of Jim’s HTMLbook, re-titled How to Do Everything with HTML & XHTML,in 2003.Jim is also a published novelist. He is the author of BlindSight (Tyndale, 2003), a suspense/thriller novel set in themind-control cults, and The Angel (Kregel, 2006), set againstthe backdrop of the euthanasia and physician-assisted suicidemovements. Jim moved into “true crime” writing with hislatest book, Terror by Night (Tyndale, 2009). Terror by Night isthe true story of the brutal 2008 murders of the Caffey familyin Emory, Texas. You can learn more about Jim’s books andother creative projects at his Web site: www.jamespence.com.www.it-ebooks.info
  4. 4. HTML & CSS:The Complete Reference,Fifth EditionThomas A. PowellNew York Chicago San FranciscoLisbon London Madrid Mexico CityMilan New Delhi San JuanSeoul Singapore Sydney Torontowww.it-ebooks.info
  5. 5. Copyright © 2010 by The McGraw-Hill Companies. All rights reserved. Except as permitted under the United States Copyright Act of 1976, nopart of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without theprior written permission of the publisher.ISBN: 978-0-07-174170-5MHID: 0-07-174170-4The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-149629-2, MHID: 0-07-149629-7.All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name,we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Wheresuch designations appear in this book, they have been printed with initial caps.McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate trainingprograms. To contact a representative please e-mail us at bulksales@mcgraw-hill.com.Information has been obtained by McGraw-Hill from sources believed to be reliable. However, because of the possibility of human ormechanical error by our sources, McGraw-Hill, or others, McGraw-Hill does not guarantee the accuracy, adequacy, or completeness of anyinformation and is not responsible for any errors or omissions or the results obtained from the use of such information.TERMS OF USEThis is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work.Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy ofthe work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute,disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your ownnoncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail tocomply with these terms.THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THEACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANYINFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLYDISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OFMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that thefunctions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill norits licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damagesresulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstancesshall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result fromthe use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shallapply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.www.it-ebooks.info
  6. 6. Contents at a GlancePart I Core Markup1 Traditional HTML and XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Introducing HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 HTML and XHTML Element Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Part II Core Style4 Introduction to CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4295 CSS Syntax and Property Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5216 CSS3 Proprietary and Emerging Features Reference . . . . . . . . . . . . . . . . . . 613Part III AppendixesA Character Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727B Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751C Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765D URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783E Reading a Document Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809vwww.it-ebooks.info
  7. 7. This page intentionally left blankwww.it-ebooks.info
  8. 8. ContentsAcknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiiPart I Core Markup1 Traditional HTML and XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3First Look at HTML and XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Hello HTML and XHTML World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Viewing Markup Locally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Viewing Markup with a Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 10HTML and XHTML: Version History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14HTML and XHTML DTDs: The Specifications Up Close . . . . . . . . . . . . . . . . 16Document Type Statements and Language Versions . . . . . . . . . . . . . 18(X)HTML Document Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20The Document Head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23The Document Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Browsers and (X)HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37The Doctype Switch and Browser Rendering Modes . . . . . . . . . . . . . 39The Rules of (X)HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41HTML Is Not Case Sensitive, XHTML Is . . . . . . . . . . . . . . . . . . . . . . . 41Attribute Values May Be Case Sensitive . . . . . . . . . . . . . . . . . . . . . . . . 42(X)HTML Is Sensitive to a Single Whitespace Character . . . . . . . . . . 42(X)HTML Follows a Content Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Elements Should Have Close Tags Unless Empty . . . . . . . . . . . . . . . . 43Unused Elements May Minimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Elements Should Nest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Attributes Should Be Quoted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Entities Should Be Used for Special Characters . . . . . . . . . . . . . . . . . . 44Browsers Ignore Unknown Attributes and Elements . . . . . . . . . . . . . 44Major Themes of (X)HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Logical and Physical Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Standards vs. Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Myths and Misconceptions About HTML and XHTML . . . . . . . . . . . 47The Future of Markup—Two Paths? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49XHTML: Web Page Markup XML Style . . . . . . . . . . . . . . . . . . . . . . . . 49HTML5: Back to the Future . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 Introducing HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Hello HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Loose Syntax Returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58XHTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60viiwww.it-ebooks.info
  9. 9. viii HTML & CSS: The Complete Referenceviii HTML & CSS: The Complete ReferenceHTML5: Embracing the Reality of Web Markup . . . . . . . . . . . . . . . . . . . . . . . 62Presentational Markup Removed and Redefined . . . . . . . . . . . . . . . . . . . . . . 63Out with the Old Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64In with the New Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Sample of New Attributes for HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . 66HTML5 Document Structure Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Adding Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Marking Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Indicating Dates and Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Inserting Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Specifying Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77HTML5’s Open Media Effort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<video> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<audio> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Media Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Client-Side Graphics with <canvas> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Drawing and Styling Lines and Shapes . . . . . . . . . . . . . . . . . . . . . . . . 85Drawing Arcs and Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Scaling, Rotating, and Translating Drawings . . . . . . . . . . . . . . . . . . . . 93Using Bitmaps in Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Text Support for canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<canvas> Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101HTML5 Form Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101New Form Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Validating Data Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Autocomplete Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Miscellaneous Usability Improvements . . . . . . . . . . . . . . . . . . . . . . . . 105Emerging Elements and Attributes to Support Web Applications . . . . . . . . 106menu Element Repurposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106command Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108meter and progress Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109details Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109output Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110The Uncertain Future of Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110The draggable Attribute and the Drag and Drop API . . . . . . . . . . . . 112contenteditable Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114spellcheck Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Internationalization Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116HTML5 Metadata Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116data-X Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Microdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117HTML5: Beyond Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120defer Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121HTML, JavaScript, and the DOM Renewed . . . . . . . . . . . . . . . . . . . . . 121Standardizing and Extending Ad Hoc JavaScript Conventions . . . . 125Major HTML5 Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126HTML5 Today or Tomorrow? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126HTML5 as a Catch-All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130HTML5: Web Politics as Usual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131HTML5: Imperfect Improvement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132www.it-ebooks.info
  10. 10. 3 HTML and XHTML Element Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Flavors of HTML and XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Core Attributes Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Language Attributes Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138lang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Other Common Attributes Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139accesskey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140contenteditable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140datafld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141dataformatas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141datasrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141hidefocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141hspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141tabindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142unselectable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142vspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Common HTML5 Attributes Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142accesskey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142contenteditable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143contextmenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143data-X (Custom Data Attributes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143draggable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144itemid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144itemprop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144itemref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145itemscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145itemtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146spellcheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146tabindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Event Attributes Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146HTML5 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Internet Explorer’s Extended Event Attributes . . . . . . . . . . . . . . . . . . 147HTML Element Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<!-- ... --> (Comment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155<!-- .[ ].. --> (Conditional Comment) . . . . . . . . . . . . . . . . . . . . . . . . . . 155<!DOCTYPE> (Document Type Definition) . . . . . . . . . . . . . . . . . . . 157<a> (Anchor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158<abbr> (Abbreviation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164<acronym> (Acronym) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166C o n t e n t s ixwww.it-ebooks.info
  11. 11. x HTML & CSS: The Complete Referencex HTML & CSS: The Complete Reference<address> (Address) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168<applet> (Java Applet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169<area> (Image Map Area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171<article> (Article) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175<aside> (Aside) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176<audio> (Audio) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177<b> (Bold) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<base> (Base URL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181<basefont> (Base Font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182<bdo> (Bidirectional Override) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183<bgsound> (Background Sound) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185<big> (Big Font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186<blink> (Blinking Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187<blockquote> (Block Quote) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188<body> (Document Body) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190<br> (Line Break) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193<button> (Form Button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195<canvas> (Canvas for Drawing) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198<caption> (Table Caption) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208<center> (Center Alignment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210<cite> (Citation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211<code> (Code Listing) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213<col> (Table Column) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214<colgroup> (Table Column Group) . . . . . . . . . . . . . . . . . . . . . . . . . . 216<command> (Command) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<comment> (Comment Information) . . . . . . . . . . . . . . . . . . . . . . . . . 220<datalist> (List of Prefill Data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<dd> (Definition Description in a Definition Listor Content in Details or Figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222<del> (Deleted Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224<details> (Additional Details) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<dfn> (Definition) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228<dir> (Directory List) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<div> (Division) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231<dl> (Definition List) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233<dt> (Term in a Definition List orCaption in Figure or Details) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236<em> (Emphasis) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238<embed> (Embedded Object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240<fieldset> (Form Field Grouping) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242<figure> (Figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244<font> (Font Definition) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246<footer> (Footer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248<form> (Form for User Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249<frame> (Window Region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252<frameset> (Frameset Definition) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<h1> through <h6> (Headings) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258<head> (Document Head) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260<header> (Header) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261<hgroup> (Header Group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263www.it-ebooks.info
  12. 12. <hr> (Horizontal Rule) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<html> (HTML Document) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267<i> (Italic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269<iframe> (Inline Frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270<ilayer> (Inflow Layer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274<img> (Image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276<input> (Input Form Control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279<ins> (Inserted Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287<isindex> (Index Prompt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289<kbd> (Keyboard Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291<keygen> (Key Pair Generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292<label> (Form Control Label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<layer> (Positioned Layer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296<legend> (Descriptive Legend) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<li> (List Item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300<link> (Link to External Files or Set Relationships) . . . . . . . . . . . . . 303<listing> (Code Listing) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311<map> (Client-Side Image Map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312<mark> (Marked Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314<marquee> (Marquee Display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316<menu> (Menu List or Command Menu) . . . . . . . . . . . . . . . . . . . . . 318<meta> (Meta-Information) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320<meter> (Scalar Gauge) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323<multicol> (Multiple Column Text) . . . . . . . . . . . . . . . . . . . . . . . . . . 325<nav> (Navigation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<nobr> (No Line Breaks) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<noembed> (No Embedded Media Support) . . . . . . . . . . . . . . . . . . 328<noframes> (No Frame Support Content) . . . . . . . . . . . . . . . . . . . . 329<noscript> (No Script Support Content) . . . . . . . . . . . . . . . . . . . . . . 330<object> (Embedded Object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<ol> (Ordered List) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335<optgroup> (Option Grouping) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338<option> (Option in Selection List) . . . . . . . . . . . . . . . . . . . . . . . . . . 339<output> (Form Output) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341<p> (Paragraph) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343<param> (Object Parameter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345<plaintext> (Plain Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347<pre> (Preformatted Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348<progress> (Progress Indicator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<q> (Quote) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351<rp> (Ruby Parentheses) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353<rt> (Ruby Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<ruby> (Ruby Annotation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<s> (Strikethrough) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359<samp> (Sample Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360<script> (Scripting) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362<section> (Section) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365<select> (Selection List) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366<small> (Small Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369<source> (Source) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371C o n t e n t s xiwww.it-ebooks.info
  13. 13. xii HTML & CSS: The Complete Referencexii HTML & CSS: The Complete Reference<spacer> (Extra Space) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373<span> (Text Span) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<strike> (Strikeout Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376<strong> (Strong Emphasis) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377<style> (Style Information) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379<sub> (Subscript) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381<sup> (Superscript) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383<table> (Table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<tbody> (Table Body) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389<td> (Table Data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392<textarea> (Multiline Text Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396<tfoot> (Table Footer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399<th> (Table Header) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<thead> (Table Header) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<time> (Time) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<title> (Document Title) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410<tr> (Table Row) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411<tt> (Teletype Text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414<u> (Underline) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415<ul> (Unordered List) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417<var> (Variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419<video> (Video) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421<wbr> (Word Break) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423<xml> (XML Data Island) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424<xmp> (Example) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425Part II Core Style4 Introduction to CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Presentational HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429The Slow Rise of CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430First Look at CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432Hello CSS World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438CSS Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440Proprietary CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440CSS Relationship with Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442The Specification of CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443CSS Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445Validating CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447Breaking the Rules Purposefully? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450Applying Style to a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452Linking to a Style Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452Embedding Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456Importing Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458Inline Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461Printer-Specific CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463Alternative Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464User Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466www.it-ebooks.info
  14. 14. Document Structure and CSS Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468!important Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470Element Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471id Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471class Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473Contextual Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476Attribute Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479Pseudo-Element Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Pseudo-Class Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487CSS Properties Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500Measurements and Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502CSS and (X)HTML Elements Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . 506Physical Markup and Overriding Expected Results . . . . . . . . . . . . . . 506Are <div> and <span> the Most Popular Tags? . . . . . . . . . . . . . . . . . 507Changing Element Types with display . . . . . . . . . . . . . . . . . . . . . . . . . 508Controlling White Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512Major Themes of CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513Separation of Structure and Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514CSS: More Appropriate and Powerful for Presentation . . . . . . . . . . . 516Cross-Browser CSS Madness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517Myths and Misconceptions Related to CSS . . . . . . . . . . . . . . . . . . . . . 517Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5195 CSS Syntax and Property Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521CSS Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521CSS Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521Style Inclusion Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524Linked Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524Embedded Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526Imported Styles—@import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526Inline Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527CSS Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527CSS Strings and Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530CSS Color Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530CSS Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533Miscellaneous CSS Constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539/* comments */ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539@charset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540@font-face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540@media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541@page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541!important . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542CSS1 and CSS 2.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543background-attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543background-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544background-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544background-position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545C o n t e n t s xiiiwww.it-ebooks.info
  15. 15. xiv HTML & CSS: The Complete Referencexiv HTML & CSS: The Complete Referencebackground-repeat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546border . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547border-bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547border-bottom-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548border-bottom-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548border-bottom-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548border-collapse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549border-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549border-left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550border-left-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551border-left-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551border-left-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552border-right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552border-right-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552border-right-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553border-right-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553border-spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553border-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554border-top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556border-top-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556border-top-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557border-top-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557border-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559caption-side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562counter-increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564counter-reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568empty-cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572font-family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572font-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573font-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574font-variant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575font-weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577letter-spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578line-height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578list-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579list-style-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579list-style-position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579list-style-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580www.it-ebooks.info
  16. 16. margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581margin-bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582margin-left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582margin-right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583margin-top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583max-height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584max-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584min-height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585min-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585orphans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586outline-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588outline-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589outline-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591padding-bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593padding-left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593padding-right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594padding-top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594page-break-after . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595page-break-before . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595page-break-inside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598table-layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598text-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599text-decoration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599text-indent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600text-transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601unicode-bidi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602vertical-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603white-space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604widows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605word-spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606z-index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607CSS2 and CSS 2.1 Aural Style Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6076 CSS3 Proprietary and Emerging Features Reference . . . . . . . . . . . . . . . . . . 613The State of CSS3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613CSS3 Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613CSS3-Introduced Values and Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621CSS3 Color Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624Media Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625Web Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626Miscellaneous CSS3 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629C o n t e n t s xvwww.it-ebooks.info
  17. 17. xvi HTML & CSS: The Complete Referencexvi HTML & CSS: The Complete ReferenceImplemented CSS3 and Browser-Specific Features . . . . . . . . . . . . . . . . . . . . . 629@keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630accelerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632animation-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633animation-direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634animation-duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635animation-iteration-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636animation-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637animation-timing-function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638backface-visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640background-clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641background-origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642background-position-x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643background-position-y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644background-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649border-bottom-left-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650border-bottom-right-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651border-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651border-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653border-top-left-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654border-top-right-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655box-reflect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655box-shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656box-sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658column-break-after . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659column-break-before . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659column-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660column-gap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661column-rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661column-rule-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662column-rule-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663column-rule-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664column-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671image-rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673ime-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673interpolation-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674layout-grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674layout-grid-char . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675layout-grid-line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675layout-grid-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676layout-grid-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676line-break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677marquee-direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677www.it-ebooks.info
  18. 18. marquee-play-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678marquee-speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679marquee-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681mask-attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682mask-box-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682mask-clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683mask-composite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684mask-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684mask-origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685mask-position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685mask-position-x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686mask-position-y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687mask-repeat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687mask-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688opacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690outline-offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690outline-radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691overflow-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691overflow-x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692overflow-y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693perspective-origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695ruby-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696ruby-overhang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697ruby-position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698scrollbar-3dlight-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698scrollbar-arrow-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699scrollbar-base-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699scrollbar-darkshadow-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700scrollbar-face-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701scrollbar-highlight-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701scrollbar-shadow-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702scrollbar-track-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703text-align-last . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704text-autospace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704text-fill-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705text-justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705text-kashida-space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706text-overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707text-rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708text-shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708text-stroke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710text-stroke-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710text-stroke-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711text-underline-position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712C o n t e n t s xviiwww.it-ebooks.info
  19. 19. xviii HTML & CSS: The Complete Referencexviii HTML & CSS: The Complete Referencetransform-origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715transform-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717transition-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717transition-duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718transition-property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719transition-timing-function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719user-select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720word-break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721word-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722writing-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724Part III AppendixesA Character Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727Encoding Quirks and Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 728Traditional HTML Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731HTML 4.x and XHTML 1.x Character Entities . . . . . . . . . . . . . . . . . . . . . . . . . 740Latin Extended-A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741Latin Extended-B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741Spacing Modifier Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741General Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741Greek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743Letter-like Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745Mathematical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746Technical Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747Geometric Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748Miscellaneous Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748Embracing Unicode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748B Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751Specifying Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751Fonts for Windows Platform and Browsers . . . . . . . . . . . . . . . . . . . . . 752Fonts for Macintosh System and Browsers . . . . . . . . . . . . . . . . . . . . . . 755PC Mac Font Similarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757Downloadable Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760Microsoft’s Dynamic Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760Standard Downloadable Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761Cross-Browser Downloadable Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . 761Font Replacement with Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763sIFR and Other Text Replacement Techniques . . . . . . . . . . . . . . . . . . . . . . . . . 764C Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765(X)HTML Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765Nonstandard Color Names and Numerical Equivalents . . . . . . . . . . 765(X)HTML Elements Supporting Color . . . . . . . . . . . . . . . . . . . . . . . . . 772www.it-ebooks.info
  20. 20. CSS Color Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773CSS Color-Related Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776Browser-Safe Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779D URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783Server Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787Fragment Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788Other Features of URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789Data URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791Other Emerging URL Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794Relative URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795Using the <base> Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795URL Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796Unclear Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797Unclear Length Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797Persistence Concerns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797Long, Dirty URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797Short, Cryptic URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797Location, Not Meaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798Beyond URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798New Addressing Schemes: URNs, URCs, and URIs . . . . . . . . . . . . . . 798E Reading a Document Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Element Type Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Occurrence Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802Logical Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803SGML Content Exclusion and Inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804Attribute Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804SGML and XML Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805Parameter Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806The DTDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809C o n t e n t s xixwww.it-ebooks.info
  21. 21. This page intentionally left blankwww.it-ebooks.info
  22. 22. AcknowledgmentsThe fifth edition of this book might as well be the first edition of a brand-new book.The HTML5 specification marks a return to past ideas and an explosion of futureideas. It took a great deal of work to put this new edition together. Given the amountof effort required, I want to make sure that all those that helped are given their due. First, Iwant to acknowledge the numerous fixes and improvements that came from the feedbackfrom both my students at UCSD and readers around the world. I write these books for you,and I am glad you are putting this information to good use.I would also like to show my appreciation to the many staff members at PINT whohelped on this book project in some direct or indirect way. I can’t specifically thank andmention the dozens of employees we have at PINT and my other firm Port80 Software whokeep the lights on, but I’ll call a few out who warrant some extra kudos.Christie Sorenson once again helped this time with heavy lifting particularly in the CSSeffort, and I can safely say that she has learned, relearned, and even forgotten more aboutWeb development than probably anyone I know, besides maybe myself. Looking forward tomore project fun in the future, Christie!Plenty of other PINTsters helped. Rob McFarlane, Andrew Simpkins, and Bryan Sleiterhelped out with imagery. The project managers, particularly Mine Okano, Robin Nobel,Matt Plotner, and Olivia Chen, gave me moral support and occasional pity as I toiled awayupstairs. Glenn Dawson addressed my many server changes and helped debug someannoying aspects of HTML5. Dan Whitworth assisted on a few chapters here and there andprobably had nightmares about getting a call to really dive in.Joe Lima listened to some of my verbal nonsense and helped guide me to some deeperinsights than I could have ever arrived at on my own.Daisy Bhonsle kept up a very long-standing proofing relationship, and I am very gladshe always helps out. The student certainly has become the master.The folks at McGraw-Hill Professional are always a pleasure to work with. MeghanRiley helped guide me along, and Megg Morin didn’t lose faith, at least not completely.Thanks for being my patron the last decade, Megg!My technical editor, James Pence, probably wondered when this project was going tofinish, and somehow he finished a nontechnical book of his own during the project.xxiwww.it-ebooks.info
  23. 23. xxii HTML & CSS: The Complete ReferenceFinally, to my friends and family who tried to give me space to write this thing, youdeserve the biggest thanks. My children, Graham, Olivia, and Desmond, had to put upwith a grouchy dad and far too many absent weekends, so we now return you to ourregularly scheduled weekends! Cecilia, you provided a lot of help as well that madethings a bit easier on all of us, so thank you for that. Finally, Sylvia, you always supportmy online efforts, as hard as they may be. I know you, more than anyone, appreciate theimportance of this project, considering the role HTML has played in our lives.Thomas A. Powelltpowell@pint.comOctober 2009www.it-ebooks.info
  24. 24. I n t r o d u c t i o n xxiiiIntroductionThe fifth edition of this book represents a significant change in structure and content toaddress HTML5. The book is similar to the previous edition in maybe a third of thecontent; otherwise, it is an all-new effort. Most obviously, as compared to the previouseditions, which focused mainly on XHTML and HTML 4, this edition focuses on HTML5,which represents both a return to the markup past and the unveiling of an exciting future ofWeb applications. However, we do retain some information from previous editions becausein order for this work to be truly complete, we must not focus only on the future but alsopresent all the elements supported in browsers today, including the archaic, proprietary, andstandard (X)HTML tags. These will still be encountered for years to come, and we want thisbook to provide the reference you need in addressing their syntax.CSS coverage has been expanded greatly to fully cover CSS 2.1 as well as every proprietaryand emerging CSS 3 property supported in one or more popular shipping browsers circa 2009.No value judgment is made; if Internet Explorer has supported a proprietary CSS feature forthe last decade, it’s included. However, we do avoid presenting CSS features that are trulyspeculative in great depth, but where appropriate, we summarize or present pointers to theemerging syntax.The ramification of the increased markup and CSS coverage is simply the book doesn’thave space left to do everything it did before. Teaching nearly everything about HTML andCSS in prose form and then presenting a complete syntax reference for the technologieswould have produced a book well over 2,000 pages. We were well on the way to that whenwe adjusted our efforts to create what you have in your hands, a solid reference book thatmay be used for years to come. This isn’t to say that learning material is not present at all.There are very solid introductory chapters for the markup and CSS sections, which shouldsuccinctly address details and standards issues. There just isn’t a step-by-step cookbook foreach element or property. Given the maturity of the Web industry, we aimed not for thecomplete tutorial, but instead for the complete reference.It should go without saying that more markup changes to HTML and CSS are inevitable.HTML5, in particular, is a complete moving target, and rather than punting on it, we tookthe best shot at its first release version as it settled in late 2009. Because of the inevitablechanges given HTML5’s rapid evolution, the support Web site, http://htmlref.com, shouldbe considered an important bookmark for readers looking for updates or the unavoidablecorrection.xxiiixxiiiwww.it-ebooks.info
  25. 25. This page intentionally left blankwww.it-ebooks.info
  26. 26. ICore Markup CHAPTER 1Traditional HTMLand XHTMLCHAPTER 2Introducing HTML5CHAPTER 3HTML and XHTMLElement ReferencePARTwww.it-ebooks.info
  27. 27. This page intentionally left blankwww.it-ebooks.info
  28. 28. 1Traditional HTML and XHTMLMarkup languages are ubiquitous in everyday computing. Although you may notrealize it, word processing documents are filled with markup directives indicatingthe structure and often presentation of the document. In the case of traditionalword processing documents, these structural and presentational markup codes are moreoften than not behind the scenes. However, in the case of Web documents, markup in the formof traditional Hypertext Markup Language (HTML) and its Extensible Markup Language(XML)-focused variant, XHTML, is a little more obvious. These not-so-behind-the-scenesmarkup languages are used to inform Web browsers about page structure and, some mightargue, presentation as well.First Look at HTML and XHTMLIn the case of HTML, markup instructions found within a Web page relay the structure ofthe document to the browser software. For example, if you want to emphasize a portion oftext, you enclose it within the tags <em> and </em>, as shown here:<em>This is important text!</em>33CHAPTERwww.it-ebooks.info
  29. 29. 4 P a r t I : C o r e M a r k u p4 P a r t I : C o r e M a r k u pWhen a Web browser reads a document that has HTML markup in it, it determines howto render it onscreen by considering the HTML elements embedded within the document:So, an HTML document is simply a text file that contains the information you want topublish and the appropriate markup instructions indicating how the browser shouldstructure or present the document.Markup elements are made up of a start tag, such as <strong>, and typically, though notalways, an end tag, which is indicated by a slash within the tag, such as </strong>. The tagpair should fully enclose any content to be affected by the element, including text and otherHTML markup.NOTE There is a distinction between an element (for example, strong) and the tags (<strong>and </strong>) that are used by the element. However, you will likely often find the word“tag” used in place of “element” in many if not most discussions about HTML markup. Thisobservation even includes historically relevant documents discussing HTML1written by TimBerners-Lee, the founding father of the Web. Fortunately, despite any imprecision of word choicethat people may exhibit when discussing markup, meaning is usually well understood and thisshould not be a tremendous concern.Under traditional HTML (not XHTML), the close tag for some elements is optionalbecause their closure can be inferred. For example, a <p> tag cannot enclose another <p>tag, and thus the closing </p> tag can be inferred when markup like this is encountered:<p>This is a paragraph.<p>This is also a paragraph.Such shortened notations that depend on inference may be technically correct under thespecification, but stylistically they are not encouraged. It is always preferable to be precise,so use markup like this instead:<p>This is a paragraph.</p><p>This is also a paragraph.</p>1Historic intro to HTML that clearly uses the term tag instead of element www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.htmlwww.it-ebooks.info
  30. 30. C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 5C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 5PARTIThere are markup elements, called empty elements, which do not enclose any content, thusneed no close tags at all, or in the case of XHTML use a self-close identification scheme. Forexample, to insert a line break, use a single <br> tag, which represents the empty br element,because it doesn’t enclose any content and thus has no corresponding close tag:<br>However, in XML markup variants, particularly XHTML, an unclosed tag is not allowed, soyou need to close the tag<br></br>or, more commonly, use a self-identification of closure like so:<br />The start tag of an element might contain attributes that modify the meaning of the tag.For example, in HTML, the simple inclusion of the noshade attribute in an <hr> tag, asshown here:<hr noshade>indicates that there should be no shading applied to this horizontal rule. Under XHTML,such style attributes are not allowed, because all attributes must have a value, so insteadyou have to use syntax like this:<hr noshade="noshade" />As the preceding example shows, attributes may require values, which are specified with anequal sign; these values should be enclosed within double or single quotes. For example,using standard HTML syntax,<img src="dog.gif" alt="Angus-Black Scottish Terrier" height="100"width="100">specifies four attributes for this <img> tag that are used to provide more information aboutthe use of the included image. Under traditional HTML, in the case of simple alphanumericattribute values, the use of quotes is optional, as shown here:<p class=fancy>Regardless of the flexibility provided under standard HTML, you should always aim touse quotes on all attributes. You will find that doing so makes markup more consistent,makes upgrading to stricter markup versions far easier, and tends to help reduce errorscaused by inconsistency.www.it-ebooks.info
  31. 31. 6 P a r t I : C o r e M a r k u p6 P a r t I : C o r e M a r k u pA graphical overview of the HTML markup syntax shown so far is presented here:Hello HTML and XHTML WorldGiven these basics of HTML syntax, it is best now to look at an example document to see itsapplication. Our first complete example written in strict HTML 4 is shown here:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Hello HTML 4 World</title><!-- Simple hello world in HTML 4.01 strict example --></head><body><h1>Welcome to the World of HTML</h1><hr><p>HTML <em>really</em> isnt so hard!</p><p>Soon you will &hearts; using HTML.</p><p>You can put lots of text here if you want.We could go on and on with fake text for youto read, but lets get back to the book.</p></body></html>ONLINE http://htmlref.com/ch1/html4helloworld.htmlA simple modification of the initial <!DOCTYPE> line is really all that is necessary tomake this an HTML5 example, the comment and text is changed so you can keep theexamples straight:<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Hello HTML5 World</title><!-- Simple hello world in HTML5 example --></head><body><h1>Welcome to the Future World of HTML5</h1><hr><p>HTML5 <em>really</em> isnt so hard!</p><h1 class=“primary”>Example Heading</h1>TagNameAttributeNameAttributeAffected ContentStart TagHTML ElementAttributeValueEndTagwww.it-ebooks.info
  32. 32. C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 7C h a p t e r 1 : Tr a d i t i o n a l H T M L a n d X H T M L 7PARTI<p>Soon you will &hearts; using HTML.</p><p>You can put lots of text here if you want.We could go on and on with fake text for youto read, but lets get back to the book.</p></body></html>ONLINE http://htmlref.com/ch1/html5helloworld.htmlIn the case of XHTML, which is a form of HTML that is based upon the syntax rules ofXML, we really don’t see many major changes yet in our example:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Hello XHTML World</title><!-- Simple hello world in XHTML 1.0 strict example --></head><body><h1>Welcome to the World of XHTML</h1><hr /><p>XHTML <em>really</em> isnt so hard either!</p><p>Soon you will &hearts; using XHTML too.</p><p>There are some differences between XHTMLand HTML but with some precise markup youllsee such differences are easily addressed.</p></body></html>ONLINE http://htmlref.com/ch1/xhtmlhelloworld.htmlThe preceding examples use some of the most common elements used in (X)HTMLdocuments, including:• The <!DOCTYPE> statement, which indicates the particular version of HTMLor XHTML being used in the document. The first example uses the strict 4.01specification, the second uses a reduced form for HTML5 the meaning of whichwill be explained a bit later on, and the final example uses the XHTML 1.0 strictspecification.• The <html>, <head>, and <body> tag pairs are used to specify the general structureof the document. The required inclusion of the xmlns attribute in the <html> tag isa small difference required by XHTML.• The <meta> tag used in the examples indicates the MIME type of the document andthe character set in use. Notice that in the XHTML example, the element has a trailingslash to indicate that it is an empty element.• The <title> and </title> tag pair specifies the title of the document, whichgenerally appears in the title bar of the Web browser.• A comment is specified by <!-- -->, allowing page authors to provide notes forfuture reference.www.it-ebooks.info
  33. 33. 8 P a r t I : C o r e M a r k u p8 P a r t I : C o r e M a r k u p• The <h1> and </h1> header tag pair indicates a headline specifying some importantinformation.• The <hr> tag, which has a self-identifying end tag (<hr />) under XHTML, insertsa horizontal rule, or bar, across the screen.