Sams Teach Yourself HTML, CSS and JavaScript All in One
Julie C. Meloni
800 East 96th Street, Indianapolis, Indiana, 46240 USA
Sams Teach Yourself HTML, CSS, and JavaScript All in One
Copyright 2012 by Pearson Education, Inc.
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-0-672-33332-3
ISBN-10: 0-672-33332-5
Acquisitions Editor
Mark Taber
Development Editor
Songlin Qiu
Managing Editor
Sandra Schroeder
Project Editor
Seth Kerney
Copy Editor
Mike Henry
Indexer
Ken Johnson
Proofreader
Jovana San Nicolas-Shirley
Technical Editor
Phil Ballard
Publishing Coordinator
Cindy Teeters
Book Designer
Gary Adair
Compositor
Trina Wurst
Library of Congress Cataloging-in-Publication data is on file.
First Printing November 2011
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or programs accompanying it.
Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact
U.S. Corporate and Government Sales
1-800-382-3419
For sales outside of the U.S., please contact
International Sales
Table of Contents
Appearance
About the Author
Julie C. Meloni is the Lead Technologist and Architect in the Online Library Environment at the University of Virginia. Before coming to the library, she worked for more than 15 years in web application development for various corporations large and small in Silicon Valley. She has written several books and articles on Web-based programming languages and database topics, including the bestselling Sams Teach Yourself PHP, MySQL, and Apache All in One.
We Want to Hear from You!
As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what were doing right, what we could do better, what areas youd like to see us publish in, and any other words of wisdom youre willing to pass our way.
You can email or write directly to let us know what you did or didnt like about this bookas well as what we can do to make our books stronger.
Please note that we cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail we receive, we might not be able to reply to every message.
When you write, please be sure to include this books title and author as well as your name and email address. We will carefully review your comments and share them with the author and editors who worked on the book.
Email:
Mail:
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA
Reader Services
Visit our website and register this book at for convenient access to any updates, downloads, or errata that might be available for this book.
Part I. Getting Started on the Web
Chapter 1. Publishing Web Content
WHAT YOULL LEARN IN THIS CHAPTER:
A very brief history of the World Wide Web
What is meant by the term web page, and why that term doesnt always reflect all the content involved
How content gets from your personal computer to someone elses web browser
How to select a web hosting provider
How different web browsers and device types can affect your content
How to transfer files to your web server using FTP
Where files should be placed on a web server
How to distribute web content without a web server
How to use other publishing methods such as blogs
Tips for testing the appearance and functionality of web content.
Before learning the intricacies of HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), and JavaScript, it is important that you gain a solid understanding of the technologies that help transform these plain-text files to the rich multimedia displays you see on your computer or handheld device when browsing the World Wide Web. For example, a file containing markup and client-side code HTML and CSS is useless without a web browser to view it, and no one besides yourself will see your content unless a web server is involved. Web servers make your content available to others who, in turn, use their web browsers to navigate to an address and wait for the server to send information to them. You will be intimately involved in this publishing process because you must create files and then put them on a server to make them available in the first place, and you must ensure that your content will appear to the end user as you intended.
A Brief History of HTML and the World Wide Web
Once upon a time, back when there werent any footprints on the moon, some farsighted folks decided to see whether they could connect several major computer networks together. Ill spare you the names and stories (there are plenty of both), but the eventual result was the mother of all networks, which we call the Internet.
Until 1990, accessing information through the Internet was a rather technical affair. It was so hard, in fact, that even Ph.D.-holding physicists were often frustrated when trying to swap data. One such physicist, the now-famous (and knighted) Sir Tim Berners-Lee, cooked up a way to easily cross-reference text on the Internet through hypertext links.
This wasnt a new idea, but his simple HTML managed to thrive while more ambitious hypertext projects floundered. Hypertext originally meant text stored in electronic form with cross-reference links between pages. It is now a broader term that refers to just about any object (text, images, files, and so on) that can be linked to other objects. Hypertext Markup Language is a language for describing how text, graphics, and files containing other information are organized and linked together.
Note
For more information about the history of the World Wide Web, see the Wikipedia article on this topic: http://en.wikipedia.org/wiki/History_of_the_Web.