Our goal in writing this book is to help you become fluent in HTML and XHTML, fully versed in their
syntax, semantics, and elements of style. We take the natural-learning approach, using examples (good ones,
of course). We cover in detail every element of the currently accepted standard versions of the languages
(HTML 4.01 and XHTML 1.0) as well as all of the current extensions supported by the popular browsers,
explaining how each element works and how it interacts with all of the other elements.
And, with all due respect to Strunk and White, throughout the book we give you suggestions for style and
composition to help you decide how best to use HTML and XHTML to accomplish a variety of tasks, from
simple online documentation to complex marketing and sales presentations. We show you what works and
what doesn't, what makes sense to those who view your pages, and what might be confusing.
In short, this book is a definitive guide to creating documents using HTML and XHTML, starting with basic
syntax and semantics and finishing with broad style guidelines to help you create beautiful, informative,
accessible documents that you'll be proud to deliver to your readers.
Our Audience
We wrote this book for anyone interested in learning and using the language of the Web, from the most casual
user to the full-time design professional. We don't expect you to have any experience in HTML or XHTML
before picking up this book. In fact, we don't even expect that you've ever browsed the Web, although we'd be
very, very surprised if you haven't. Being connected to the Internet is not strictly necessary to use this book,
but if you're not connected, this book becomes like a travel guide for the homebound.
The only things we ask you to have are a computer, an editor that can create simple text files, and copies of
the latest web browsers. We used the latest Internet Explorer, Mozilla Firefox, Netscape Navigator, and Opera
Software ASA's Opera for the examples in this book. Because HTML and XHTML documents are stored in a
universally accepted formatplain textand because the languages are completely independent of any specific
computer, we won't even make an assumption about the kind of computer you're using. However, browsers do
vary by platform and operating system, which means that your HTML or XHTML documents can look quite
different depending on the computer and browser version. So we explain where we can how the various
browsers use certain language features, paying particular attention to how they are different.
If you are new to HTML, the Web, or hypertext documentation in general, you should start by reading
Chapter 1. In it, we describe how all these technologies come together to create web sites of interrelated
documents.
If you are already familiar with the Web, but not with HTML or XHTML specifically, start by reading
Chapter 2. This chapter is a brief overview of the most important features of the language and serves as a
roadmap to how we approach the language in the remainder of the book.
Subsequent chapters deal with specific language features in a roughly top-down approach to HTML and
XHTML. Read them in order for a complete tour through the language, or jump around to find the exact
feature you're interested in.
Text Conventions
Throughout the book, we use a constant-width typeface to highlight any literal element of the
HTML/XHTML standards, tags, and attributes. We always use lowercase letters for tags.
[*]
We use italic for
filenames and to indicate new concepts when they are defined. Elements you need to supply when creating
your own documents, such as tag attributes and user-defined strings, appear in constant-width italic
in the code.
19
19