Teach Yourself Visually HTML5
by Mike Wooldridge
Teach Yourself VISUALLY HTML5
Published by John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Published simultaneously in Canada
Copyright 2011 by John Wiley & Sons, Inc., Indianapolis, Indiana
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, 201-748-6011, fax 201-748-6008, or online at www.wiley.com/go/permissions.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Some content that appears in standard print versions of this book may not be available in other formats. For more information about Wiley products, visit us at www.wiley.com.
Library of Congress Control Number: The Library of Congress number is available from the Library of Congress.
ISBN: 978-1-118-14596-8
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Trademark Acknowledgments
Wiley, the John Wiley & Sons, Inc. logo, Visual, the Visual logo, Teach Yourself VISUALLY, Read Less - Learn More and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
FOR PURPOSES OF ILLUSTRATING THE CONCEPTS AND TECHNIQUES DESCRIBED IN THIS BOOK, THE AUTHOR HAS CREATED VARIOUS NAMES, COMPANY NAMES, MAILING, E-MAIL AND INTERNET ADDRESSES, PHONE AND FAX NUMBERS AND SIMILAR INFORMATION, ALL OF WHICH ARE FICTITIOUS. ANY RESEMBLANCE OF THESE FICTITIOUS NAMES, ADDRESSES, PHONE AND FAX NUMBERS AND SIMILAR INFORMATION TO ANY ACTUAL PERSON, COMPANY AND/OR ORGANIZATION IS UNINTENTIONAL AND PURELY COINCIDENTAL.
Contact Us
For general information on our other products and services please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002.
For technical support please visit www.wiley.com/techsupport.
Sales | Contact Wiley at (877) 762-2974 or fax (317) 572-4002.
Credits
Acquisitions Editor
Aaron Black
Project Editor
Terri Edwards
Technical Editor
Namir Shammas
Copy Editor
Scott Tullis
Editorial Director
Robyn Siesky
Business Manager
Amy Knies
Senior Marketing Manager
Sandy Smith
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Barry Pruett
Project Coordinator
Patrick Redmond
Graphics and Production Specialists
Andrea Hornberger
Jennifer Mayberry
Heather Pope
Quality Control Technician
Dwight Ramsey
Proofreader
Betty Kish
Indexer
BIM Indexing & Proofreading Services
Vertical Websites Project Manager
Laura Moss-Hollister
Vertical Websites Assistant Project Manager
Jenny Swisher
Vertical Websites Associate Producer
Shawn Patrick
Screen Artist
Ana Carrillo
About the Author
Mike Wooldridge is a Web developer based in the San Francisco Bay Area. Hes written dozens of books for the Visual series. You can access more information about HTML5 and the example files used in this book at his website: www.wooldridge.net/html5
Authors Acknowledgments
Mike thanks Brianna Stuart for her help in preparing the book manuscript. He thanks Terri Edwards for her project management, Scott Tullis for his copy editing, and Namir Shammas for his technical editing. This book is dedicated to Mikes eleven-year-old son who helps Mike teach Web classes.
How to Use This Book
Who This Book Is For
This book is for the reader who has never used this particular technology or software application. It is also for readers who want to expand their knowledge.
The Conventions in This Book
Steps
This book uses a step-by-step format to guide you easily through each task. Numbered steps are actions you must do; bulleted steps clarify a point, step, or optional feature; and indented steps give you the result.
Notes
Notes give additional information special conditions that may occur during an operation, a situation that you want to avoid, or a cross-reference to a related area of the book.
Icons and Buttons
Icons and buttons show you exactly what you need to click to perform a step.
Tips
Tips offer additional information, including warnings and shortcuts.
Bold
Bold type shows command names or options that you must click or text or numbers you must type.
Italics
Italic type introduces and defines a new term.
Chapter 1: Getting Started with HTML5 and Web Pages