Quick Reference: XHTML Documents

In this chapter you have been learning how to write well-formed and valid XHTML documents. The <!DOCTYPE> declarations for XHTML 1.0 are difficult to remember, not to mention case sensitive. Thus, it’s a good idea to create several different templates, one for each of the three different DTDs. After you have validated those templates against the DTDs, you will be able to save yourself a lot of time and grief by simply reusing them every time you want to create an XHTML document. For reference, the <!DOCTYPE> declarations are listed in the following table, along with some other important XHTML information:

To Do This

Use This

Add an XHTML 1.0 Transitional <!DOCTYPE> declaration

<!DOCTYPE html PUBLIC "-//W3C//
DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/

Add an XHTML 1.0 Strict <!DOCTYPE> declaration

<!DOCTYPE html PUBLIC "-//W3C//
DTD XHTML 1.0 Strict//EN"

Add an XHTML 1.0 Frameset <!DOCTYPE> declaration

<!DOCTYPE html PUBLIC "-//W3C//
DTD XHTML 1.0 Frameset//EN"

Add the XHTML namespace to a document

<html xmlns="http://www.w3.org/

Add character encoding information to a document

<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-7" />

Validate an XHTML document


How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

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