Appendix A: HTML and XHTML Element Reference

 <  Day Day Up  >  


This appendix provides a complete reference for the elements in the HTML 4.01 and XHTML 1.0 specifications. Elements commonly supported by Internet Explorer, Netscape, and Opera are also presented. Some elements presented here might be deprecated, but they are also included because browser vendors continue to support them or they are still in common use.

Flavors of HTML and XHTML

There are many versions of HTML and XHTML in existence. In the early days, the specification of HTML was somewhat fluid, and browser vendors of all sizes added their own elements. First, the Internet Engineering Task Force (IETF) and later the World Wide Web Consortium (W3C) set standards for HTML, including the following:

  • HTML 2       The basic standard supported by early browsers like Mosaic.

  • HTML 3.0       A standard that was never widely adopted, as it was developed during the time of heavy browser innovation.

  • HTML 3.2       A version of the HTML 3.0 specification that adopted many browser-invented elements and removed nonimplemented HTML 3.0 elements.

  • HTML 4.0 Transitional       The modern version of HTML, complete with frames , scripting, and style sheet support. This version includes presentational elements.

  • HTML 4.0 Strict       A version of HTML that removes most of the presentational features of the language in favor of CSS-based presentation.

  • HTML 4.0 Frameset       A version of HTML that defines support for frames and inline frames.

  • HTML 4.01 Transitional, Strict, and Frameset       A slight bug fix release of the HTML 4 specifications.

Eventually, the rigor of XML was added to HTML, and XHTML 1.0 (http://www.w3.org/TR/xhtml1/) became a W3C recommendation on January 26, 2000. XHTML 1.0 retains a number of deprecated, presentational elements that are still present in the HTML specifications. XHTML 1.0 supports the transitional, strict, and frameset variants of HTML 4. The versions that have begun to follow XHTML 1.0 are not covered in depth in this book, as they are still not widely adopted, and in the case of XHTML 2, not fully defined.

XHTML 1.1

XHTML 1.1 is a stricter specification that, as defined by the W3C, is "a markup language that is rich in structural functionality, but that relies upon style sheets for presentation." XHTML 1.1's other focus is on modularization of XHTML, which makes it easier to define and segment the features supported in the language. XHTML 1.1 has only very basic changes from the strict variant of XHTML. These changes are summarized here:

  • On every element supporting the lang attribute, the lang attribute has been replaced with xml:lang .

  • The name attribute has been removed in favor of id on the a and map elements.

  • The ruby- related elements (such as ruby and rt ) have been included for adding small text readings to primarily eastern character-set text.

The XHTML 1.1 specification can be found online at http://www.w3.org/TR/xhtml11/.

XHTML Basic

A pared-down version of XHTML 1.1, called XHTML Basic, is geared toward mobile applications. The specification defines a subset of XHTML, including the following:

  • Structure module: html , head , title , body

  • Text module: abbr , acronym , address , blockquote , br , cite , code , dfn , div , em , h1 , h2 , h3 , h4 , h5 , h6 , kbd , p , pre , q , samp , span , strong , var

  • Hypertext module: a

  • List module: dl , dt , dd , ol , ul , li

  • Basic forms module: form , input , label , select , option , textarea

  • Basic tables module: table , caption , tr , td , th

  • Image module: img

  • Object module: object , param

  • Metainformation module: meta

  • Link module: link

  • Base module: base

Of these, the structure, text, hypertext, and list modules are mandatory, but other modules may even be omitted if the device cannot handle them. The XHTML Basic specification can be found at http://www.w3.org/TR/xhtml-basic/.

XHTML 2

The XHTML 2 specification is in progress at the time of this edition's writing and represents a somewhat radical departure from XHTML 1. The goal of XHTML 2 is to make the markup language completely logical and provide no backward compatibility for older versions. Already this approach has been the recipient of significant ire from some developers, particularly those who followed W3C standards for years and who now find that their well-crafted documents may be without an easy upgrade path . A few of the changes XHTML 2 may introduce include the following:

  • Some improvement to text direction handling.

  • A common edit attribute to indicate inserted, deleted, changed, and moved text, and a datetime common attribute to indicate when changes were made.

  • A change to use navindex over tabindex for selecting elements using a keyboard or alternative mechanism.

  • The ability to make nearly any object a link, and to link content into any object.

  • A completely different way to handle events based upon XML Events (http://www.w3.org/TR/xml-events/).

  • A new <h> tag to be used with a <section> tag to better organize documents. The various heading tags like <h1> may be deprecated in favor of this new style.

  • A line tag <l> to define a line of text or computer code. This may remove the need for a <br> tag.

  • An exciting new <nl> tag that would be used to create navigation lists or menus .

  • The removal of <img> in favor of <object> .

  • A <standby> tag to help deal with slow loading objects.

  • A <summary> tag for tables.

  • The removal of traditional form-field elements in favor of the richer XForms specification (http://www.w3.org/TR/xforms/)

Beyond this brief description, which may certainly be wrong by the time you read it, little can be said about XHTML 2 with certainty , other than the specification may take quite some time to be finalized, and it will certainly take even more time before the major browsers embrace it.
To keep up with the latest XHTML 2 activity, visit http://www.w3.org/TR/xhtml2/.



 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net