HTML5 and CSS3 All-in-One For Dummies, 3rd Edition
Published by:
John Wiley & Sons, Inc.,
111 River Street,
Hoboken, NJ 07030-5774,
www.wiley.com
Copyright 2014 by John Wiley & Sons, Inc., Hoboken, New Jersey
Media and software compilation copyright 2014 by John Wiley & Sons, Inc. All rights reserved.
Published simultaneously in Canada
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 the prior written permission of the Publisher. 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 http://www.wiley.com/go/permissions .
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. 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 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 .
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 http://booksupport.wiley.com . For more information about Wiley products, visit www.wiley.com .
Library of Congress Control Number: 2013952425
ISBN 978-1-118-28938-9 (pbk); ISBN 978-1-118-42139-0 (ePub); ISBN 978-1-118-41983-0 (ePDF)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
About the Author
Andy Harris began his teaching life as a special education teacher. As he was teaching young adults with severe disabilities, he taught himself enough computer programming to support his teaching habit with freelance programming. Those were the exciting days when computers started to have hard drives, and some computers began communicating with each other over an arcane mechanism some were calling the Internet.
All this time Andy was teaching computer science part time. He joined the faculty of the Indiana University-Purdue University Indianapolis Computer Science department in 1995. He serves as a Senior Lecturer, teaching the introductory course to freshmen as well as numerous courses on web development, general programming, and game programming. As manager of the Streaming Media Laboratory, he developed a number of online video-based courses, and worked on a number of international distance education projects including helping to start a computer science program in Tetevo, Macedonia FYR, and collaboration with Sun-Yat-Sen University in Guangzhou, China.
Andy is active in home schooling, and is the technology columnist for a national homeschool magazine.
Andy is the author of several other computing books including HTML5 Game Development For Dummies, JavaScript/AJAX for Dummies, and Game Programming: The L Line. He invites your comments and questions at .
Dedication
I dedicate this book to Jesus Christ, my personal savior, and to Heather, the joy in my life. I also dedicate this project to Elizabeth, Matthew, Jacob, and Benjamin. I love each of you.
Authors Acknowledgments
Thank you first to Heather. Even though I type all the words, this book is a real partnership, like the rest of our life. Thanks for being my best friend and companion. Thanks also for doing all the work it takes for us to sustain a family when Im in writing mode.
Thank you to Connie Santisteban. Ive really enjoyed working with you on this project.
Thank you to the copy and development editor, Linda Morris. I appreciate your efforts to make my geeky mush turn into something readable. Thanks for improving my writing.
A special thanks to Claudia Snell for technical editing. I appreciate your vigilance. You have helped to make this book as technically accurate as possible.
Thank you to the many people at Wiley who contribute to a project like this. The author only gets to meet a few people, but so many more are involved in the process. Thank you very much for all youve done to help make this project a reality.
A big thank you to the open-source community which has created so many incredible tools and made them available to all. Id especially like to thank the creators of Firefox, Firebug, Aptana, HTML Validator, Komodo Edit, Notepad++, PHP, Apache, jQuery, and the various jQuery plug-ins. This is an amazing and generous community effort.
Thanks to those Ive gotten to learn and teach with, from the graduate students, to the math homework girls: Graciela and Vanesa.
Id finally like to thank the IUPUI computer science family for years of support on various projects. Thank you especially to all my students, current and past. Ive learned far more from you than the small amount Ive taught. Thank you for letting me be a part of your education.
Publishers Acknowledgments
Acquisitions Editor: Constance Santisteban
Project Editor: Linda Morris
Copy Editor: Linda Morris
Technical Editor: Claudia Snell
Editorial Assistant: Annie Sullivan
Sr. Editorial Assistant: Cherie Case
Project Coordinator: Sheree Montgomery
Cover Image: iStockphoto.com/Marina Strizhak
Chapter 1
Sound HTML Foundations
In This Chapter
Creating a basic web page
Understanding the most critical HTML tags
Setting up your system to work with HTML
Next page