




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































HTML & CSS: The Complete Reference, Fifth Edition
New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto
Acknowledgments................................................ xxi Introduction..................................................... xxiii
(Paragraph) - (Object Parameter) - (Plain Text) - (Preformatted Text) - (Progress Indicator) - (Quote) - (Ruby Parentheses) - (Ruby Text) - (Ruby Annotation) - (Strikethrough) - (Sample Text) -
## AcknowledgmentsT he 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 future ideas. It took a great deal of work to put this new edition together. Given the amount of effort required, I want to make sure that all those that helped are given their due. First, I want to acknowledge the numerous fixes and improvements that came from the feedback from 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 who helped on this book project in some direct or indirect way. I can’t specifically thank and mention the dozens of employees we have at PINT and my other firm Port80 Software who keep 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 CSS effort, and I can safely say that she has learned, relearned, and even forgotten more about Web development than probably anyone I know, besides maybe myself. Looking forward to more project fun in the future, Christie! Plenty of other PINTsters helped. Rob McFarlane, Andrew Simpkins, and Bryan Sleiter helped 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 away upstairs. Glenn Dawson addressed my many server changes and helped debug some annoying aspects of HTML5. Dan Whitworth assisted on a few chapters here and there and probably 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 deeper insights than I could have ever arrived at on my own. Daisy Bhonsle kept up a very long-standing proofing relationship, and I am very glad she always helps out. The student certainly has become the master. The folks at McGraw-Hill Professional are always a pleasure to work with. Meghan Riley 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 to finish, and somehow he finished a nontechnical book of his own during the project.
T he fifth edition of this book represents a significant change in structure and content to address HTML5. The book is similar to the previous edition in maybe a third of the content; otherwise, it is an all-new effort. Most obviously, as compared to the previous editions, 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 of Web applications. However, we do retain some information from previous editions because in order for this work to be truly complete, we must not focus only on the future but also present all the elements supported in browsers today, including the archaic, proprietary, and standard (X)HTML tags. These will still be encountered for years to come, and we want this book 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 proprietary and 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 for the last decade, it’s included. However, we do avoid presenting CSS features that are truly speculative in great depth, but where appropriate, we summarize or present pointers to the emerging syntax. The ramification of the increased markup and CSS coverage is simply the book doesn’t have space left to do everything it did before. Teaching nearly everything about HTML and CSS in prose form and then presenting a complete syntax reference for the technologies would have produced a book well over 2,000 pages. We were well on the way to that when we adjusted our efforts to create what you have in your hands, a solid reference book that may 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 should succinctly address details and standards issues. There just isn’t a step-by-step cookbook for each element or property. Given the maturity of the Web industry, we aimed not for the complete 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 took the best shot at its first release version as it settled in late 2009. Because of the inevitable changes given HTML5’s rapid evolution, the support Web site, http://htmlref.com, should be considered an important bookmark for readers looking for updates or the unavoidable correction.
Traditional HTML and XHTML
Introducing HTML
HTML and XHTML Element Reference PART