Chapter 1. HTML and XHTML Reference
This chapter provides a complete list of HTML tags and attributes specified in the W3C recommendations for HTML 4.01 and XHTML 1.1 plus those implemented in
's and today's mainstream browsers. This includes many items from the Web Hypertext Application Technology Working Group (WHATWG), such as Web Forms 2.0. Version information
each tag and attribute so that you can see whether a particular entry applies to the browser(s) you must support. At a glance, you can see the version number of Internet Explorer (IE), pre-Mozilla Netscape Navigator (NN), Mozilla-based browsers (Moz), Safari (Saf), Opera (Op), and the W3C HTML specification (HTML) in which the item was first introduced. Because this book deals with Dynamic HTML, the history timeline goes back only to HTML 3.2, Netscape Navigator 2, and Internet Explorer 3. For derivatives of the Mozilla Foundation's browser (e.g., Firefox, Netscape 6 or later, Camino, etc.), see Appendix F. Although some DHTML facilities were available in early versions of Opera, this book starts its Opera history with version 7 from 2003, which coincides with the
of the rendering engine that Opera uses today. Therefore, an item
"Op 7" may have been supported by earlier versions.
Other than for Opera, if an item existed prior to one of these versionsor was available at the first release of
browsers, such as Mozilla and Safariand is still in use, it is simply marked "all." Where no implementation exists, I've used "n/a" to
that. Items valid for a single version show the number encased in pipe symbols (e.g., 4 for Version 4 only). Deprecated items are listed here because modern browsers support them for backward compatibility, and legacy code may rely on them. When an item has been not only deprecated, but removed from a standard, it is indicated with a "less than" symbol, as in <4. In a change from the last edition of this book, the NN indicators are only for Versions 2 through 4 of Netscape Navigator. Items that first appeared in Netscape 6 are covered by the Mozilla entries.
Following a section that lists attributes shared by all elements, this chapter is organized alphabetically by HTML element (or tag, if you prefer); within each element's description, attributes are listed
. The reference entries are designed so that it is easy to see which elements require end tags (in HTML), and whether attributes are optional or required. Scripted object references are displayed in the W3C DOM standard syntax style unless the item requires a different DOM style (e.g., the Navigator 4
element). Although the W3C DOM
syntax prevails in the listings, if IE supports the item through its DOM scripting, you can assume that the
reference style also applies in that environment. The description for an item details any significant differences between the various browser
of the item, but this reference is not intended to be a universal bug database.
All example code is formatted according to W3C HTML standards because the widest number of DHTML browsers support that format and all readers will be familiar with it. At the same time, however, the code
most practices encouraged for XHTML formatting, such as lowercase tag and attribute
and quoted attribute values of all types. The only XHTML formatting characteristics lacking from the example code are end tags for empty elements (such as the XHTML
technique) and explicit value assignments to attributes that do not require them in HTML (such as the
attribute of checkbox type
elements). These coding style variations are easy to modify on your own if your code must conform to XHTML validation (see Online Section I).
coverage of event types
to event attributes mentioned in this chapter, see Chapter 3. To find out which, if any, HTML and XHTML DTDs support a particular element or attribute,