|
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// |
Add an XHTML 1.0 Strict <!DOCTYPE> declaration | <!DOCTYPE html PUBLIC "-//W3C// |
Add an XHTML 1.0 Frameset <!DOCTYPE> declaration | <!DOCTYPE html PUBLIC "-//W3C// |
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" |
Validate an XHTML document | http://validator.w3.org |
|