Beginning HTML5 and CSS 3
Copyright 2012 by Richard Clark, Oli Studholme, Christopher Murphy and Divya Manian
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publishers location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law.
ISBN-13 (pbk): 978-1-4302-2874-5
ISBN-13 (electronic): 978-1-4302-2875-2
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logos, or image we use the names, logos, or images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail .
For information on translations, please e-mail .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk SaleseBook Licensing web page at www.apress.com/bulk-sales
.
Any source code or other supplementary materials referenced by the author in this text is available to readers at www.apress.com. For detailed information about how to locate your books source code, go to www.apress.com/source-code/
.
Credits |
President and Publisher: Paul Manning | Copy Editor: Mary Behr
|
Lead Editor: Ben Renow-Clarke | Compositor: Bytheway Publishing Services
|
Technical Reviewers: Andrew Zack and Chris Mills | Indexer: SPi Global
|
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Morgan Ertel, Jonathan Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman, James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt Wade, Tom Welsh | Artist: SPi Global
|
Cover Designer: Anna Ishchenko
|
Coordinating Editor: Christine Ricketts and Jennifer Blackwell |
For K & J.
Richard
For C, R & C
C
Contents at a Glance
Contents
,, and
,, and,
, and
, plus
-enclosed subheadinguse,,(and)
element
element
element and related new (and old) attributeselement
Forewords
HTML5. Its the most significant web spec today, and the first upgrade of the Webs ubiquitous language in a decade. Together with its cousin CSS 3, its very powerful,very exciting and very much a buzzword. Some experts will tell you that you can only use HTML5/ CSS 3 in the bleeding-edge nightly build of their favourite browser. Other pundits will tell you that you cant use them because the specs arent finished, or there is no support in Internet Explorer, or other such blahblahblah.
When youre trying to learn you need trustworthy teachers who are neither pedantic zealots or flatulent marketeers. You need people like Rich, Oli, Chris and Divya.
Richard Clark is a fellow HTML5 Doctor, curator of HTML5 gallery and, crucially, is a man who builds things. Oli Studholme is also a fellow HTML5 Doctor and developer working in the trenches, only these trenches are in his adopted homeland of Japan. Chris is Subject Director of Interactive Multimedia Design, at the University of ulster - one of the few universities in the world that teaches modern web design that employers actually need their newly hired graduates to know. Divya is one of the team behind HTML5 Boilerplate and an Adobe representative on the CSS Working Group.
Bruce Lawson
Co-author Introducing HTML5 (New Riders), Open Web Evangelist, Opera Software
Its hard to believe it, but there was a time when CSS was considered a dying technology. Riven by incomplete and (worse) incompatible implementations, mired by a legacy not of its own making, it seemed destined to join the towering scrap-heap of interesting-yet-failed technologies-and now, thanks to some lucky breaks and hard work, here it is, a fundamental aspect of the web. Indeed, it has spread far beyond the web, showing up as the display mechanism in software as diverse chat clients and operating systems. If it is less critical to our modern networks than HTML, it cannot be by much.
Even more exciting, after a relatively quiet period, CSS is being rapidly expanded and enriched on multiple fronts. Ideas from frameworks and libraries are being merged into the official specifications. Long-standing proposals are gaining monentum. Ancient omissions are being addressed. All in all, theres so much happening that it could be an experts full-time job keeping track of it all.
Fortunately, what you have here in your hands is the product of several experts combined knowledge, skills, and insight. Chris, Divya, Oli, and Rich are all veterans at navigating the sometimes dense language of W3C specifications to extract the shining jewels found within. Furthermore, they excel at taking those rough diamonds and polishing them to brilliant examples of how and why a feature should be used. If I were starting out, I could hardly wish for better guides to understanding whats important and interesting in CSS today-and as the old, grizzled codger I actully am, I look to them forclues regarding where I should or shouldnt be looking, in order to stay abreast of everything thats happening.
CSS is experiencing nothing short of a Renaissance. Enjoy learning from these four masters of its art.
Eric A. Meyer
Author, CSS: The Definitive Guide (OReilly); Co-founder, An Event Apart
About the Authors