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 HTMLthat defines support for frames and inline frames.
- HTML 4.01 Transitional, Strict, and Frameset A slight bug fix release of the HTML 4 specifications.
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
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 XMLEvents (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/)
Next: Core Attributes Reference