Laura Lemay's Teach Yourself Web Pub. W/HTML 3.2 twpfm.htm

- Teach Yourself Web Publishing with HTML in 14 days

- Here's what people are saying about Laura Lemay's Teach Yourself Web Publishing with HTML
- Copyright " 1996 by Sams.net Publishing
- Trademarks

- Overview
- Acknowledgments
- About the Author

- Laura Lemay

- Introduction

- Who Should Read This Book
- What This Book Contains
- What You Need Before You Start
- Conventions Used in This Book

- Special Elements
- HTML Input and Output Examples
- Special Fonts

- Teach Yourself Web Publishing The CD-ROM and the Web Site

#
Teach Yourself Web Publishing with HTML in 14 days

Laura Lemay

Sams.net
201 West 103rd Street
Indianapolis, Indiana 46290

Acquisitions and Development Editor

Fran Hatton

Software Development Specialist

Merle Newlon

Production Editor

Kristi Hart

Technical Reviewers

Angela Allen, Edward Bates,
Pam Shephard

Editorial Coordinator

Bill Whitmer

Technical Edit Coordinators

Lynette Quinn, Lorraine Schaffer

Formatter

Frank Sinclair

Editorial Assistants

Carol Ackerman, Andi Richter, Rhonda Tinch-Mize

Cover Designer

Tim Amrhein

Book Designer

Gary Adair

Copy Writer

Peter Fuller

Production Supervisor

Brad Chinn

Production

Stephen Adams, Carol Bowers, Michael Brumitt, Charlotte Clapp, Michael Dietsch, Jason Hand, Daniel Harris, Clint Lahnen, Steph Mineart, Ryan Oldfather, Dana Rhodes, Bobbi Satterfield, Ian Smith, Laura A. Smith, Mark Walchle, Jeff Yesh

Indexer

Carol Sheehan

President, Sams Publishing

Richard K. Swadley

Publishing Manager

Mark Taber

Managing Editor

Cindy Morrow

Marketing Manager

John Pierce

Assistant Marketing Manager

Kristina Perry

#####
Here's what people are saying about Laura Lemay's Teach Yourself Web Publishing with HTML

"There are some good HTML primers on the Web itself, but if you're like me, you'll find it easier to learn by cracking a book. The best I've found is Laura Lemay's Teach Yourself Web Publishing with HTML."

—Marc Frons, Business Week

"Laura Lemay delivers on her title's promise. By following her clear sequence of explanations, examples, and exercises, even the absolute Web novice can create serviceable documents within a few days. Better, she moves quickly beyond mechanics to techniques and tools for designing maximally effective and attractive presentations in spite of the medium's limitations."

—Michael K. Stone, Whole Earth Review

"Of all the HTML books out right now, I think Lemay's is the best, and I recommend it."

—Nancy McGough, Infinite Ink

"If you are looking for an easy-to-read introduction to HTML, this book is for you. Lemay has a clear understanding of what works and what doesn't, and she conveys her thoughts in a concise, orderly fashion."

—Robert Stewart, The Virtual Mirror

"If you want to create a Web page, or even if you already have created one, and you want a great book to help you understand it all, check out Laura Lemay's Teach Yourself Web Publishing with HTML. I've used mine so much I practically know it by heart!"

—Camille Tillman, Book Stacks Unlimited

"All in all, this is a quality 'do-it-yourself' book for beginners of HTML publishing. The ABCs of HTML are explained clearly, and the exercises are instructive and easy to follow."

—Jim Duber, Chorus

"This is a very thorough book on HTML, and quite accurate. Laura Lemay is a good technical writer who explains things well. This is the book I wish I'd had when I started to learn HTML."

—Bob Cunningham, University of Hawaii

"My best recommendation goes to this book by Laura Lemay, entitled Teach Yourself Web Publishing with HTML. There is simply no better book available, and many that are much worse than this one. If you study it, you will know more than enough to create stunning Web pages of your own."

—Bob Bickford

"If you want a good book that will help you understand how everything is really working, take a look at Sams Publishing's Teach Yourself Web Publishing with HTML. It is a very well-written book, and it includes all the information in an easy to understand format."

—Ron Loewy, HyperAct, Inc.

"There's a superb new book about HTML called Teach Yourself Web Publishing with HTML_. It is very thorough and well-laid out."

—Michael MacDonald

"I think Lemay's first book can take some degree of credit for the growth of the Web itself. I wonder how many of the tens of thousands of home pages created in the past six months have been done by folks with dog-eared copies of Teach Yourself Web Publishing within arm's reach."

—Dave Elliott, The Web Academy

#####
Copyright " 1996 by Sams.net Publishing

PROFESSIONAL REFERENCE EDITION

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. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Sams.net Publishing, 201 W. 103rd St., Indianapolis, IN 46290.

International Standard Book Number: 1-57521-096-7

Library of Congress Catalog Card Number: 96-67214

99 98 97 96…………………………………4 3 2 1

Interpretation of the printing code: the rightmost double-digit number is the year of the book's printing; the rightmost single-digit, the number of the book's printing. For example, a printing code of 96-1 shows that the first printing of the book occurred in 1996.

Composed in AGaramond, Futura, and MCPdigital by Macmillan Computer Publishing

Printed in the United States of America

#####
Trademarks

All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams.net 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.

##
Overview

Introduction |
Day 1 | Getting Started: The World Wide Web and You
1 | The World of the World Wide Web
2 | Get Organized
Day 2 | Creating Simple Web Pages
3 | Begin with the Basics
4 | All About Links
Day 3 | Doing More with HTML
5 | More Text Formatting with HTML
6 | HTML Assistants: Editors and Converters
Day 4 | Images and Backgrounds
7 | Using Images, Color, and Backgrounds
8 | Creating Images for the Web
Day 5 | Multimedia on the Web: Animation, Sound, Video, and Other Files
9 | External Files, Multimedia, and Animation
10 | Sound and Video Files
Day 6 | Designing Effective Web Pages
11 | Writing and Designing Web Pages: Dos and Don'ts
12 | Examples of Good and Bad Web Design
Day 7 | Advanced HTML Features: Tables and Frames
13 | Tables
14 | Frames and Linked Windows
Day 8 | Going Live on the Web
15 | Putting It All Online
16 | Setting Up Your Own Server
Day 9 | Creating Interactive Pages
17 | Image Maps
18 | Basic Forms
Day 10 | All About CGI Programming
19 | Beginning CGI Scripting
20 | Useful Forms and Scripts
Day 11 | Interactive Examples
21 | Real-Life Informational Presentations
22 | Real-Life Interactive Presentations
Day 12 | JavaScript
23 | Creating JavaScript Scripts
24 | Working with JavaScript
Day 13 | Java, Plug-ins, and Embedded Objects
25 | Using Java
26 | Plug-ins and Embedded Objects
Day 14 | Doing More with Your Server
27 | Web Server Hints, Tricks, and Tips
28 | Web Server Security and Access Control
Bonus Day | Creating Professional Sites
29 | Testing, Revising, and Maintaining Web Presentations
30 | Managing Larger Presentations and Sites
A | Sources for Further Information
B | HTML Language Reference
C | Cross-Browser Comparison of HTML
D | Colors by Name and Hexadecimal Value
E | MIME Types and File Extensions
F | JavaScript Language Reference
G | Java Language Reference
H | ActiveX and Visual Basic Script Language Reference
Index |

##
Acknowledgments

To Sams and Sams.net publishing for letting me write the kind of HTML book I wanted to see.

To the Coca-Cola Company, for creating Diet Coke and selling so much of it to me.

To all the folks on the comp.infosystems.www newsgroups, the www-talk mailing list, and the Web conference on the WELL, for answering questions and putting up with my late-night rants.

To innumerable people who helped me with the writing of this book, including Lance Norskog, Ken Tidwell, Steve Krause, Tony Barreca, CJ Silverio, Peter Harrison, Bill Whedon, Jim Graham, Jim Race, Mark Meadows, and many others I'm sure I've forgotten.

And finally, to Eric Murray, the other half of lne.com, for moral support when I was convinced I couldn't possibly finish writing any of this book on time, for setting up all my UNIX and networking equipment and keeping it running, and for writing a whole lot of Perl code on very short notice (I need a form that calculates the exact weight of the person who submits it based on the phase of the moon, the current gross national debt, and what that person ate for dinner. You can do that in Perl, can't you?). Most of the programs in this book are his work, and as such he deserves a good portion of the credit. Thank you, thank you, thank you, thank you, thank you.

##
About the Author

#####
Laura Lemay

Laura Lemay is a technical writer and confirmed Web addict. Between spending 12 hours a day in front of a computer and consuming enormous amounts of Diet Coke, she sometimes manages to write a book. She is the author of Teach Yourself Web Publishing in a Week and Teach Yourself Java in a Week, and specializes in just about anything related to Web page writing, design, programming, and Web-related publications systems. Her goal for the remainder of the year is to try to get one of her motorcycles to actually run.

You can visit her home page at http://www.lne.com/lemay/.

##
Introduction

So you've browsed the Web for a while, and you've seen the sort of stuff that people are putting up on the Net. And you're noticing that more and more stuff is going up all the time, and that more and more people are becoming interested in it. "I want to do that," you think. "How can I do that?" If you have the time and you know where to look, you could find out everything you need to know from the information out on the Web. It's all there, it's all available, and it's all free. Or, you could read this book instead. Here, in one volume that you can keep by your desk to read, reference, and squish spiders with, is nearly all the information you need to create your own Web pages—everything from how to write them, to how to link them together, to how to set up your own Web server and use it to manage forms, and to create special programs to process them.

But wait, there's more. This book goes beyond the scope of other books on how to create Web pages, which just teach you the basic technical details such as how to produce a boldface word. In this book, you'll learn why you should be producing a particular effect and when you should use it, as well as how. In addition, this book provides hints, suggestions, and examples of how to structure your overall presentation, not just the words within each page. This book won't just teach you how to create a Web presentation—it'll teach you how to create a good Web presentation.

Also, unlike many other books on this subject, this book doesn't focus on any one computer system. Regardless of whether you're using a PC running Windows, a Macintosh, or some dialect of UNIX (or any other computer system), many of the concepts in this book will be valuable to you, and you'll be able to apply them to your Web pages regardless of your platform of choice.

Sound good? Glad you think so. I thought it was a good idea when I wrote it, and I hope you get as much out of this book reading it as I did writing it.

###
Who Should Read This Book

Is this book for you? That depends:

- If you've seen what's out on the Web, and you want to contribute your own content, this book is for you.
- If you represent a company that wants to create an Internet "presence" and you're not sure where to start, this book is for you.
- If you're an information developer, such as a technical writer, and you want to learn how the Web can help you present your information online, this book is
  for you.
- If you're doing research or polling and you're interested in creating a system that allows people to "register" comments or vote for particular suggestions or items, this book is for you.
- If you're just curious about how the Web works, some parts of this book are for you, although you might be able to find what you need on the Web itself.
- If you've never seen the Web before but you've heard that it's really nifty and want to get set up using it, this book isn't for you. You'll need a more general book about getting set up and browsing the Web before moving on to actually producing Web documents yourself.
- You've done Web presentations before with text and images and links. Maybe you've played with a table or two and set up a few simple forms. In this case, you may be able to skim the first half of the book, but the second half should still offer you a lot of helpful information.

###
What This Book Contains

This book is intended to be read and absorbed over the course of two weeks (although it may take you more or less time depending on how much you can absorb in a day). On each day you'll read two chapters, which describe one or two concepts related to Web presentation design.

Day 1 Getting Started: The World Wide Web and You

You get a general overview of the World Wide Web and what you can do with it, and then come up with a plan for your Web presentation.

Day 2 Creating Simple Web Pages

You learn about the HTML language and how to write simple documents and link them together using hypertext links.

Day 3 Doing More with HTML

You do more text formatting with HTML, including working with text alignment, rule lines, and character formatting. You'll also get an overview of the various HTML editors available to help you write HTML.

Day 4 Images and Backgrounds

Today covers everything you ever wanted to know about images, backgrounds, and using color on the Web.

Day 5 Multimedia on the Web: Animation, Sound, Video, and Other Files

You learn all about adding multimedia capabilities to your Web presentations: using images, sounds, and video to enhance your material.

Day 6 Designing Effective Web Pages

You get some hints for creating a well-constructed Web presentation, and you explore some examples of Web presentations to get an idea of what sort of work you can do.

Day 7 Advanced HTML Features: Tables and Frames

You learn about some of the advanced features of HTML available in Netscape and other browsers: tables and frames.

Day 8 Going Live on the Web

Starting Week 2, you learn how to put your presentation up on the Web, including how to set up a Web server and advertise the work you've done.

Day 9 Creating Interactive Pages

Today covers adding interactive forms and image maps to your Web page, including the new client-side image map tags.

Day 10 All About CGI Programming

Today introduces you to CGI programming; in the first half you learn all about writing CGI scripts and programs, and in the second half you work through a number of examples.

Day 11 Interactive Examples

Today contains nothing but lots of examples—both informational and interactive—for you to look at and explore.

Day 12 JavaScript

You explore JavaScript, a new language available in Netscape to add new features to and interactivity to your Web pages.

Day 13 Java, Plug-ins, and Embedded Objects

Today covers more Netscape enhancements: the use of Java applets inside Web pages, and including other embedded objects through the use of plug-ins.

Day 14 Doing More with Your Server

You learn lots of new tricks for using your server, including using server-includes, security, and authentication.

Bonus Day Creating Professional Sites

And finally, just when you thought you were done, there's a Bonus Day that covers some extra information for testing and maintaining your Web presentation and for managing really large presentations.

NOTE
Several chapters in this book have been adapted from Wes Tatters' Teach Yourself Netscape Web Publishing in a Week. Chapters 21, 22, 23, and 24, all contain material that has been updated, revised, and added to specifically for this book and the HTML Web publishing environment.
Appendixes B, C, and H were contributed by Stephen Le Hunte, and Appendix F was adapted from Arman Danesh's Teach Yourself Java Script in a Week.

###
What You Need Before You Start

There are seemingly hundreds of books on the market about how to get connected to the Internet, and lots of books about how to use the World Wide Web. This book isn't one of them. I'm assuming that if you're reading this book, you already have a working connection to the Internet, that you have a World Wide Web browser such as Netscape, Mosaic, or Lynx available to you, and that you've used it at least a couple of times. You should also have at least a passing acquaintance with some other portions of the Internet such as electronic mail, Gopher, and Usenet news, because I may refer to them in general terms in this book. Although you won't need to explicitly use them to work through the content in this book, some parts of the Web may refer to these other concepts.

In other words, you need to have used the Web in order to provide content for the Web. If you have this one simple qualification, then read on!

###
Conventions Used in This Book

This book uses special typefaces and other graphical elements to highlight different types of information.

####
Special Elements

Four types of "boxed" elements present pertinent information that relates to the topic being discussed: Note, Tip, Warning, and New Term. Each item has a special icon associated with it.

NOTE
Notes highlight special details about the current topic.
It's a good idea to read the tips because they present shortcuts or trouble-saving ideas for performing specific tasks.

WARNING
Don't skip the warnings. They supply you with information to help you avoid making decisions or performing actions that can cause trouble for you.

NOTE
Whenever I introduce a new term, I set it off in a box like this one and define it for you. I use italic for new terms.

####
HTML Input and Output Examples

Throughout the book, I present exercises and examples of HTML input and output. Here are the input and out icons.

An input icon identifies HTML code that you can type in yourself.

An output icon indicates what the HTML input produces in a browser such as Netscape or Lynx.

####
Special Fonts

Several items are presented in a monospace font, which can be plain or italic. Here's what each one means:

plain mono | Applied to commands, filenames, file extensions, directory names, Internet addresses, URLs, and HTML input.For example, HTML tags such as <TABLE> and <P> appear in this font.
mono italic | Applied to placeholders, which are generic items for which something specific is substituted as part of a command or as part of computer output. For instance, the term represented by filename would be the real name of the file, such as myfile.txt.

###
Teach Yourself Web Publishing The CD-ROM and the Web Site

In the back of this book, you'll find a CD-ROM disc. This disc contains many of the examples you'll find in this book, images and icons you can use in your own Web pages, and programs to make your Web development easier. Throughout this book I'll be pointing out tools from the CD that you can use, using the icon that appears next to the following paragraph.

An icon like this indicates something on the CD that you can use.

In addition to the CD you get when you buy this book, there is also a Web site. This site contains updated information about where to find tools and hints and source code for many Web tools you might be interested in incorporating into your own presentations. The site is at http://www.lne.com/Web/—check it out!