This appendix contains an A to Z reference to the elements and attributes included in HTML 4.01, as well as a guide for creating XHTML documents that are both backward compatible with HTML and forward compatible with future versions of XHTML.
FIND IT ONLINE
You can see the full text of the HTML 4.01 specification on the Web at www.w3.org/TR/html4/. I've organized the HTML elements according to this order of precedence:
Following are some comments about creating HTML 4.01 documents.
A number of elements and attributes have been deprecated in HTML 4.01 (they are marked with the letter "D" in this reference). Just because elements or attributes have been deprecated, however, doesn't mean that their use in HTML documents is invalid. Their use is perfectly valid, as long as you declare your document as conforming to the transitional definition of HTML 4.01 (or earlier HTML version). Many of the deprecated elements and attributes in HTML 4.01 are "presentational" elements or attributes that are used to control the appearance of an HTML document and have been deprecated in favor of using styles to produce similar or superior results. Using styles allows the separation of presentation (controlled by CSS) from structure and content (controlled by HTML), helping to make Web pages more accessible for users of non-visual browsers. Styles, however, present compatibility problems with earlier browsers.
Because implementing styles requires the addressing of compatibility problems with earlier browsers with flawed implementations of the CSS, you should feel free to continue to use deprecated elements and attributes that have been deprecated in favor of using styles. Styles are the preferred alternative, but their use is not mandatory. You are free to choose whether you want to use styles or not.
Officially, deprecation is supposed to signal that an element or attribute might be declared obsolete in a future version of HTML. The W3C, however, has also declared that HTML 4.01 is the final version of HTML, which means there is no reason to fear that deprecated elements and attributes will be declared obsolete in the future. Even with XHTML 1.0, for which there will be future versions, use of deprecated elements and attributes will remain valid, as long as you declare your document as conforming to the transitional definition of XHTML 1.0. (For more information on using XHTML, see "XHTML Compatibility Guidelines" later in this appendix.)
The latest versions of HTML require that a DOCTYPE declaration be included at the start of an HTML document. This specifies the specific DTD (Document Type Definition) that the document is in conformance with. The DOCTYPE declaration is inserted at the very top of the page, ahead of any HTML elements (including the HTML tag). There are three DTDs defined for HTML 4.01: Strict, Transitional, and Frameset.
You can declare this level of conformance for your document if no deprecated elements or attributes are included and no frameset elements are included. Here's an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
You can declare this level of conformance for your document if no frameset elements are included. Deprecated elements and attributes, however, may be included. Here's an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
You should declare this level of conformance if your document includes frameset elements. Here's an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
The "EN" in the preceding DOCTYPE example constructs specifies English as the language type of the document. For information on creating HTML documents in languages other than English, see the full HTML 4.01 specification.
Current browsers use the DocType declaration to do what is called "DocType switching." See "Understanding DocType Switching" in the Sunday Evening session for more information.