The Definitive Guide to HTML5 Copyright © 2011 by Adam Freeman All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-43023960-4 ISBN-13 (electronic): 978-1-4302-3961-1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and 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, trademarks, 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. President and Publisher: Paul Manning Lead Editor: Ben Renow-Clarke Development Editor: Ewan Buckingham Technical Reviewers: Kevin Grant and Andy Olsen 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 Coordinating Editor: Jennifer L. Blackwell Copy Editors: Lori Cavanaugh, Roger LeBlanc, Ralph Moore, Vanessa Moore, Marilyn Smith, Kim Wimpsett Compositor: Bytheway Publishing Services Indexer: BIM Indexing & Proofreading Services Artist: SPI Global Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800- SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. For information on translations, please e-mail [email protected], or visit www.apress.com. 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 Sales–eBook Licensing web page at www.apress.com/bulk-sales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.apress.com. You will need to answer questions pertaining to this book in order to successfully download the code. Dedicated to my lovely wife, Jacqui Griffyth –Adam Freeman Contents at a Glance About the Author About the Technical Reviewers Acknowledgments Part I: Getting Started Chapter 1: Putting HTML5 in Context Chapter 2: Getting Ready Chapter 3: Getting Started with HTML Chapter 4: Getting Started with CSS Chapter 5: Getting Started with JavaScript Part II: The HTML Elements Chapter 6: HTML Elements in Context Chapter 7: Creating HTML Documents Chapter 8: Marking Up Text Chapter 9: Grouping Content Chapter 10: Creating Sections Chapter 11: Table Elements Chapter 12: Working with Forms Chapter 13: Customizing the Input Element Chapter 14: Other Form Elements and Input Validation Chapter 15: Embedding Content Part III: Cascading Style Sheets Chapter 16: CSS in Context Chapter 17: Using the CSS Selectors—Part I Chapter 18: Using the CSS Selectors—Part II Chapter 19: Using Borders and Backgrounds Chapter 20: Working with the Box Model Chapter 21: Creating Layouts Chapter 22: Styling Text Chapter 23: Transitions, Animations, and Transforms Chapter 24: Other CSS Properties and Features Part IV: Working with the DOM Chapter 25: The DOM in Context Chapter 26: Working with the Document Object Chapter 27: Working with the Window Object Chapter 28: Working with DOM Elements Chapter 29: Styling DOM Elements Chapter 30: Working with Events Chapter 31: Using the Element-Specific Objects Part V: Advanced Features Chapter 32: Using Ajax – Part I Chapter 33: Using Ajax—Part II Chapter 34: Working with Multimedia Chapter 35: Using the Canvas Element – Part I Chapter 36: Using the Canvas Element – Part II Chapter 37: Using Drag & Drop Chapter 38: Using Geolocation Chapter 39: Using Web Storage Chapter 40: Creating Offline Web Applications Index Contents About the Author About the Technical Reviewers Acknowledgments Part I: Getting Started Chapter 1: Putting HTML5 in Context The History of HTML The Introduction of JavaScript The End of the Browser Wars The Dominance of Plugins The Emergence of Semantic HTML The Trend: The HTML Standard Lags Behind HTML Use Introducing HTML5 The New Standard(s) Embracing Native Multimedia Embracing Programmatic Content Embracing the Semantic Web The Current State of HTML5 Browser Support for HTML5 Site Support for HTML5 The Structure of This Book Finding More Information About HTML5 Summary Chapter 2: Getting Ready
Description: