Teach Yourself Web Publishing with HTML 3.2 in 14 Days
teach yourself
WEB Publishing
with HTML
in 14 days
by Laura Lemay
C O N T E N T S
Introduction
Chapter 1 The World of the World Wide Web
Chapter 2 Get Organized
- Anatomy of a Web Presentation
- What Do You Want To Do on the Web?
- Set Your Goals
- Break Up Your Content into Main Topics
- Ideas for Organization and Navigation
- Storyboarding Your Web Presentation
- Summary
- Q&A
Chapter 3 Begin with the Basics
- What HTML Is and What It Isn't
- What HTML Files Look Like
- Programs To Help You Write HTML
- Structuring Your HTML
- The Title
- Headings
- Paragraphs
- Lists, Lists, and More Lists
- Comments
- Summary
- Q&A
Chapter 4 All About Links
- Creating Links
- Linking Local Pages Using Relative and Absolute Pathnames
- Links to Other Documents on the Web
- Linking to Specific Places Within Documents
- Anatomy of a URL
- Kinds of URLs
- Summary
- Q&A
Chapter 5 More Text Formatting with HTML
- Character Styles
- Preformatted Text
- Horizontal Rules
- Line Break
- Addresses
- Quotations
- Special Characters
- Text Alignment
- Fonts and Font Sizes
- The Dreaded <BLINK>
- Other Extensions
- Summary
- Q&A
Chapter 6 HTML Assistants: Editors and Converters
Chapter 7 Using Images, Color, and Backgrounds
- Images on the Web
- Inline Images in HTML: The <IMG> Tag
- Images and Text
- Images and Links
- Using External Images
- Providing Alternatives to Images
- Using Color
- Image Backgrounds
- Hints for Better Use of Images
- Summary
- Q&A
Chapter 8 Creating Images for the Web
- Image Formats
- Color
- Image Compression
- Image Interlacing and Transparent Backgrounds
- Creating and Using Images
- Coming Soon: PNG
- For More Information
- Summary
- Q&A
Chapter 9 External Files, Multimedia, and Animation
- What Is External Media?
- External Sound, Video, and Other Files
- The State of Inline Multimedia on the Web
- Inline Video
- Inline Sounds
- Animated Marquees
- Animation Using GIF Files
- Animation Using Java
Chapter 10 Sound and Video Files
- An Introduction to Digital Sound
- Common Sound Formats
- Getting Sound Files
- Sampling Sound
- Converting Sound Files
- Audio for the Web
- An Introduction to Digital Video
- Movie Formats
- Movie Compression
- Codec Formats
- Digitizing Video
- Getting and Converting Video
- Video for the Web
- For More Information
- Summary
- Q&A
Chapter 11 Writing and Designing Web Pages: Dos and Don'ts
- Using the HTML Extensions
- Writing for Online
- Design and Page Layout
- Using Links
- Using Images
- Other Good Habits and Hints
- Summary
- Q&A
Chapter 12 Examples of Good and Bad Web Design
- Example One: A Company Profile
- Example Two: A Multimedia Encyclopedia
- Example Three: A Shopping Catalog
- Example Four: An Online Book
- Summary
- Q&A
Chapter 13 Tables
- A Note About the Table Definition
- Creating Basic Tables
- Table and Cell Alignment
- Cells That Span Multiple Rows or Columns
- Defining Table and Column Widths
- Other Features of Tables
- Alternatives to Tables
- Summary
- Q&A
Chapter 14 Frames and Linked Windows
- What Are Frames and Who Supports Them?
- Working with Linked Windows
- Working with Frames
- Creating Complex Framesets
- Summary
- Q&A
Chapter 15 Putting It All Online
- What Does a Web Server Do?
- Locating a Web Server
- Organizing and Installing Your HTML Files
- What's My URL?
- Test, Test, and Test Again
- Troubleshooting
- Registering and Advertising Your Web Pages
- Site Indexes and Search Engines
- Announce Your Site via Usenet
- Business Cards, Letterheads, and Brochures
- Finding Out Who's Viewing Your Web Pages
- Summary
- Q&A
Chapter 16 Setting Up Your Own Web Server
- The Advantages and Disadvantages of Running Your Own Server
- Finding a Computer
- Finding a Network Connection
- Software
- Servers for UNIX Systems
- Servers for Windows
- Servers for Macintoshes
- Tips for Good Server Administration
- Summary
- Q&A
Chapter 17 Image Maps
- What Is an Image Map?
- Creating Server-Side Image Maps
- Creating Client-Side Image Maps
- Building Web Pages That Support Both Types of Image Maps
- Summary
- Q&A
Chapter 18 Basic Forms
- Anatomy of a Form
- Simple Form Layout
- Text Input Fields
- More Forms Layout
- Uploading Files Using Forms
- Summary
- Q&A
Chapter 19 Beginning CGI Scripting
- What Is a CGI Script?
- Can I Use CGI Scripts?
- Anatomy of a CGI Script
- Creating Special Script Output
- Scripts To Process Forms
- Troubleshooting
- CGI Variables
- Programs To Decode Form Input
- Nonparsed Headers Scripts
- <ISINDEX> Scripts
- Summary
- Q&A
Chapter 20 Useful Forms and Scripts
- Where To Find the Examples and the Code
- Example One: Collecting, Formatting, and E-mailing Form Input
- Example Two: An RGB-to-Hexadecimal Converter
- Example Three: Searching an Address Book
- Example Four: Creating a Guest Book
- Other Ideas
- Summary
- Q&A
Chapter 21 Real-Life Informational Presentations
- View the Examples on the Web
- Maggie Porturo: Personal Pages
- Beanpole Software: Company Pages
- Summary
- Q&A
Chapter 22 Real-Life Interactive Presentations
- View the Examples on the Web
- An Online Web Developer's Survey with Results
- The WebZone Magazine Subscription Database: Adding, Changing, and Deleting Records
- A Web-Based BBS or Conferencing System
- Summary
- Q&A
Chapter 23 Creating JavaScript Scripts
- Introducing JavaScript
- The <SCRIPT> Tag
- Basic Commands and Language Structure
- Basic JavaScript Programming
- Summary
- Q&A
Chapter 24 Working with JavaScript
Chapter 25 Using Java
Chapter 26 Plug-ins and Embedded Objects
- What's an Embedded Object?
- Using Plug-ins
- Creating Pages with Embedded Objects and Plug-ins
- Up and Coming: ActiveX
- Gathering the Standards: The <OBJECT> Tag
- Summary
- Q&A
Chapter 27 Web Server Hints, Tricks, and Tips
Chapter 28 Web Server Security and Access Control
- Hints for Making Your Server More Secure
- Hints on Writing More Secure CGI Scripts
- An Introduction to Web Server Access Control and Authentication
- Access Control and Authentication in ncSA HTTPD
- ncSA Options
- ncSA Options and Access Control Overrides
- Secure Network Connections and SSL
- Summary
- Q&A
Chapter 29 Testing, Revising, and Maintaining Web Presentations
Chapter 30 Managing Larger Presentations and Sites
- Planning a Larger Presentation
- Databases and the Web
- More Navigation Aids for Larger Presentations
- Creating Standards for Style and Design
- Summary
- Q&A
Appendix A Sources for Further Information
- Access Counters
- Browsers
- Collections of HTML and WWW Development Information
- Forms and Image Maps
- HTML Editors and Converters
- HTML Validators, Link Checkers, and Simple Spiders
- Java, JavaScript, and Embedded Objects
- Log File Parsers
- Other
- Servers and Server Administration
- Sound and Video
- Specifications for HTML, HTTP, and URLs
- The Common Gateway Interface (CGI) and CGI Scripting
- The Future of HTML and the Web
- Tools and Information for Images
- Web Providers
- WWW Indexes and Search Engines
Appendix B HTML Language Reference
- Document Structure Elements
- Anchor Element
- Block-Formatting Elements
- Character Data
- Document Sound
- Dynamic Documents
- Forms
- In-line Images
- Information-Type and Character-Formatting Elements
- List Elements
- Tables
Appendix C Cross-Browser Comparison of HTML
Appendix D Colors by Name and Hexadecimal Value
Appendix E MIME Types and File Extensions
Appendix F JavaScript Language Reference
- Dynamic Documents with JavaScript
- JavaScript Objects and Their Properties
- The anchor Object
- The button Object
- The checkbox Object
- The Date Object
- The document Object
- The form Object
- The frame Object
- The hidden Object
- The history Object
- The link Object
- The location Object
- The Math Object
- The navigator Object
- The password Object
- The radio Object
- The reset Object
- The select Object
- The string Object
- The submit Object
- The text Object
- The textarea Object
- The window Object
- Independent Functions, Operators, Variables, and Literals
Appendix G Java Language Reference
- <APPLET>: Including a Java Applet
- <EMBED>: Embedding Objects
- Quick Reference
- The Java Class Library
- java.applet
Appendix H ActiveX and Visual Basic Script Language Reference
- Microsoft ActiveX Technology
- Using ActiveX Controls
- ActiveX/Visual Basic Script Examples
- ActiveX Control Pack
- <OBJECT> ... </OBJECT>
- The Label Control-IELABEL.OCX
- The Timer Control-IETIMER.OCX
- The Animated Button-IEANBTN.OCX
- The Chart Control-IEchART.OCX
- The New Button Control-IENEWB.OCX
- The Pre-loader Control-IEPRELD.OCX
- The Intrinsic Controls-HTMLCTL.OCX (Registered During Internet Explorer 3.0 Setup)
- The Active Movie Control-AMOVIE.OCX
- The ActiveVRML Control-AVVIEW.DLL
- Visual Basic Script
Credits
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
HTML conversion by :
M/s. LeafWriters (India) Pvt. Ltd.
Website : http://leaf.stpn.soft.net
e-mail :
leafwriters@leaf.stpn.soft.net
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.
President, Sams Publishing | Richard K. Swadley |
Publishing Manager | Mark Taber |
Managing Editor | Cindy Morrow |
Marketing Manager | John Pierce |
Assistant Marketing Manager | Kristina Perry |
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 |
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. |
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. |
Tip |
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. |
New Term |
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!