HTML, XHTML, & CSS All-in-One For Dummies, 2nd Edition
by Andy Harris
HTML, XHTML, & CSS All-in-One For Dummies, 2nd Edition
Published by
Wiley Publishing, Inc.
111 River Street
Hoboken, NJ 07030-5774
www.wiley.com
Copyright 2011 by Wiley Publishing, Inc., Indianapolis, Indiana
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 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 http://www.wiley.com/go/permissions.
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything Easier, and related trade dress are trademarks 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.
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 its books in a variety of 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 was not included in the version you purchased, you may download this material at booksupport.wiley.com For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2010937814
ISBN: 978-0-470-53755-8
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 courses 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.
Andy is the author of several other computing books including JavaScript For Dummies, Flash Game Programming 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 Mark Enochs. Its great to have an editor who gets me, and whos willing to get excited about a project. I really enjoy working with you.
Thanks very much to Katie Feltman. Its fun to see how far a few wacky ideas have gone. Thanks for continuing to believe in me, and for helping me to always find an interesting new project.
Thank you to the copy editors: first and foremost, I thank Brian Walls for his all his hard work in making this edition presentable. Thanks also go to Teresa Artman, John Edwards, and Melba Hopper for their help. I appreciate your efforts to make my geeky mush turn into something readable. Thanks for improving my writing.
A special thanks to Jeff Noble for his 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.
Thanks to Chris McCulloh for all you did on the first edition, and I thank you for your continued friendship.
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, the Web Developer toolbar, Ubuntu and the Linux community, Notepad++, PHP, Apache, jQuery, and the various jQuery plugins. This is an amazing and generous community effort.
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.