Writing for the Web: A Primer for Librarians

by Eric H. Schnell

Extensible Hypertext Markup Language (XHTML)

    This is a family of current and future document types and modules that reproduce, subset, and extend HTML. Elements of HTML have been combined with XML 1.0 to make a single language. XHTML document types ultimately are designed to work in conjunction with XML-based user agents. XHTML documents are XML conforming and are readily viewed, edited, and validated with standard XML tools.

   What makes using XHTML easier than other languages is that you can apply current knowledge of HTML to write documents that end up mostly stable, cross-platform and cross-browser compliant. One needs to only need to tweek existing HTML code to make it XHTML compliant.

   Two specific sections of the XHTML 1.0 specification are particulary useful for converting existing HTML documents to XHTML. Differences with HTML 4 shows changes that must be followed to make documents XHTML 1.0 compliant. Essentially, all elements must either have closing tags or be written in a special form. XHTML Compatibility Guidelines provides guidance on how to make XHTML work in currently available browsers currently available.

   In XHTML, all tags are defined in lowercase. Unlike with HTML, every open tag in an XHTML document needs to be accompanied by a closing tag. A common shortcut to this is to add a close-command slash at the end of the tag to turn it off. For example:

<img src="image.gif" alt="image"/>

   All tag attribute arguments, including percentages and numbers, must also be in double quotes.

For More Information:

Next:
PDF

Back:
XML




Table of Contents | References and Resources | Glossary


Page Updated: January 28, 2003