XHTML » Introduction

Download free PDF version

Welcome to the DevGuru XHTML Quick Reference guide. This is a handy 180 page reference source that defines and explains all of the tags, events, and associated attributes that compose XHTML (eXtensible Hyper Text Markup Language, version 1.0. This Quick Reference also includes useful, real world, working examples of code for each tag. In addition, there are write-ups, with code examples, for the 17 events and another 7 attributes that are commonly available to many tags.

To understand the future importance of XHTML, you first need to understand the current importance of HTML.

HTML is one of the most widely used computer languages in the world. The popularity of HTML is due to the fact that it is the coding technology used to publish content on the World Wide Web (also referred to as the Internet or Web). Programmers quickly discovered that HTML is a user friendly language and is very easy to learn. This ease of coding significantly aided in the proliferation of Web sites. The latest version of HTML is 4.01 which is defined by the standard published on 24 December 1999 by the World Wide Web Consortium (W3C).

In the foreseeable future, HTML will continue to serve as the basic structure for the Internet, but it is doubtful that there will be any newer versions or significant changes beyond HTML version 4.01. It is probably fair to predict that the future of HTML is XHTML and a search of the literature will reveal that XHTML is regularly referred to as the the next generation of HTML.

The history of XHTML is very simple; it is derived directly from HTML version 4.01 and is designed to be used with XML. Indeed, XHTML is part of a whole new suite of "X" technologies, with acronyms such as XML, XPATH, XSL, and XSLT, that are destined to have a profound effect on the Internet.

This is a new technology. On 26 January 2000, the W3C issued the recommendation for XHTML version 1.0. It is also a rapidly evolving technology. The recommendation for version 1.1, which is a module-based concept for XHTML, has already been published.

There are a few fundamental differences between HTML and XHTML that will profoundly effect how you code with XHTML. While HTML is a loose and forgiving language, XHTML will quickly remind you of a strict English teacher who demands firm adherence to the rules of grammar. Fortunately, the syntax and coding rules are very straightforward, easy to implement, and make common sense. The real purpose of these rules is to allow a seamless integration of XHTML with XML and other related "X" technologies.

  • All attributes, events, and tags must be written in lower case.
  • All elements must be closed.
  • The value assigned to an attribute must be enclosed in quotes.
  • No attribute may be minimized.
  • All elements must be properly nested.
  • XHTML documents must be well-formed.
  • There must be a DOCTYPE declaration.