Tải bản đầy đủ (.pdf) (338 trang)

wrox press html5 24-hour trainer (2011)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (15.02 MB, 338 trang )


HTML5 24HOUR TRAINER
INTRODUCTION xxv
SECTION  I GETTING STARTED WITH HTML5
LESSON 1 What Is HTML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
LESSON 2 Creating Your First Web Page 9
LESSON 3 Viewing Web Pages 15
SECTION I  I STYLING YOUR WEB PAGE
LESSON 4 What Is CSS? 21
LESSON 5 Testing CSS 29
SECTION II  I WORKING WITH HTML BASICS
LESSON 6 Adding Text 37
LESSON 7 Styling Text with CSS 45
LESSON 8 Linking to Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
LESSON 9 Validating Your Pages 67
SECTION IV INCORPORATING IMAGE  S
LESSON 10 Working with Images 75
LESSON 11 Using Image Maps 87
LESSON 12 Adding Horizontal Rules 93
SECTION  V USING LISTS
LESSON 13 Inserting Unordered Lists 101
LESSON 14 Working with Ordered Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
LESSON 15 Extending Lists 115
SECTION V  I STRUCTURING TABLES
LESSON 16 Building a Simple Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
LESSON 17 Styling Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
LESSON 18 Making Tables More Accessible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Continues
SECTION VI  I BUILDING FORMS
LESSON 19 Creating a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151


LESSON 20 Enhancing Forms 165
SECTION VII  I ENHANCING HTML WITH JAVASCRIPT
LESSON 21 Adding JavaScript 179
LESSON 22 Advanced JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
SECTION I  X ADDING MEDIA
LESSON 23 Working with Plug-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
LESSON 24 Inserting Audio 211
LESSON 25 Inserting Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
SECTION  X NEXT STEPS IN HTML5
LESSON 26 Looking Ahead in HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
LESSON 27 Enhancing Web Page Structure 239
LESSON 28 Integrating Advanced Design Elements . . . . . . . . . . . . . . . . . . . . . . . . . 249
APPENDIX A Browser Support for HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
APPENDIX B Advanced HTML5 Features 277
APPENDIX C What’s on the DVD? 281
INDEX 287
HTML5
24-HOUR TRAInER

HTML5
24HOUR TRAINER
Joseph W. Lowery
Mark Fletcher
HTML5 24-Hour Trainer
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright ©2011 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada
ISBN: 978-0-470-64782-0
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
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 />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 pro-
motional 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 pub-
lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site 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 Web site may provide or recommendations it may make. Further, readers
should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was
written and when it is read.
For general information on our other products and services please contact our Customer Care Department within the
United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with
standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to
media such as a CD or DVD that is not included in the version you purchased, you may download this material at
. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2010937824
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trade-
marks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries,

and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley
Publishing, Inc., is not associated with any product or vendor mentioned in this book.
For Nelee, whose life will resonate for
generations to come
— J
o s e p h Lo w e r y
To my wife, Vanessa. You are and always will
be my soul mate.
— M
a r k FL e t c h e r

EXECUTIVE EDITOR
Bob Elliott
SENIOR PROJECT EDITOR
Kevin Kent
TECHNICAL EDITOR
Carlos Gonzalez
SENIOR PRODUCTION EDITOR
Debra Banninger
COPY EDITOR
Kim Cofer
EDITORIAL DIRECTOR
Robyn B. Siesky
EDITORIAL MANAGER
Mary Beth Wakefield
FREELANCER EDITORIAL MANAGER
Rosemarie Graham
ASSOCIATE DIRECTOR OF MARKETING
David Mayhew
PRODUCTION MANAGER

Tim Tate
VICE PRESIDENT AND
EXECUTIVE GROUP PUBLISHER
Richard Swadley
VICE PRESIDENT AND EXECUTIVE PUBLISHER
Barry Pruett
ASSOCIATE PUBLISHER
Jim Minatel
PROJECT COORDINATOR, COVER
Katie Crocker
COMPOSITOR
Je Wilson,
Happenstance Type-O-Rama
PROOFREADER
Nancy Carrasco
INDEXER
Robert Swanson
COVER DESIGNER
Michael E. Trent
COVER IMAGE
© Konstantin Inozemtsev/istockphoto.com
CREDITS

ABOUT THE AUTHORS
JOSEPH LOWERY’S books about the Web and web-building tools are international bestsellers, having
sold more than 400,000 copies worldwide in 11 different languages. His most recent books are the
Adobe Dreamweaver CS5 Bible and Adobe CS4 Web Workflows. Joe developed the Dreamweaver
CS5 and WordPress 3.0 course for Lynda.com. He is the author of the popular CSS Hacks and
Filters as well as numerous other books on creating websites. A well-known speaker, Joe has pre-
sented at Adobe conferences in the United States and Europe as well as user groups around the

country. Joe bases his books on over 12 years of real-world experience building sites, applications,
and tools for web designers and developers. He currently works with a number of designers and
also designs sites himself.
MARK FLETCHER is an eLearning Developer specializing in Rapid e-Learning Development. Mark
has worked with many blue chip companies such as Adobe Systems Inc., eSyncTraining.com, and
a leading eLearning company. Mark also has presented at a number of conferences on e-Learn-
ing. Mark lives on the northwest coast of the United Kingdom with his wife, Vanessa, and their
two children, Joel and Lucy. Mark can be reached on his personal blog.
http://macrofireball
.blogspot.com
.
ABOUT THE TECHNICAL EDITOR
CARLOS GONZALEZ was born in Brighton on the south coast of England in 1979. He started doing
graphic and web design 11 years ago. Carlos worked for Victoria Real on the first two Big Brother
UK websites. He has been a freelance web designer for over 6 years, creating bespoke websites with
a keen focus on aesthetics and the latest W3C standards.

ACKNOWLEDGMENTS
THANKS TO ALL THE GREAT folks at Wiley/Wrox for helping with this book. We really appreciate the
work put in by Scott Meyers, Kevin Kent, Rosemarie Graham, and others for keeping us on track
and moving forward.

×