HTML and CSS Reference
In-Depth Information
the root of the current server in the dtds directory:
"-//W3C//DTD XHTML 1.0 Transitional//EN"
You can download the DTDs from the W3C at and
install them wherever convenient. That archive contains the entire XHTML spec. You'll find the DTDs in the DTD
Pages that define framesets should use the frames DTD instead:
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">
This is not necessary for pages that merely use an iframe for an ad or two. The transitional DTD works fine for
You can automate these fixes fairly easily. TagSoup does not add DOCTYPE declarations, but Tidy does. Unless
asked otherwise, it defaults to the transitional DTD when run in XHTML mode.
This is also fairly easy to fix with multifile search and replace. Search for an html start-tag at the beginning of a
document, like this:
You may want to allow for whitespace in front of the start-tag, too:
Then replace that with the desired DOCTYPE followed by <html .
Once you've added the DOCTYPE, validate all your documents, as discussed in Chapter 2 . This will reveal a
number of problems to fix. I'll detail some of the most common problems in subsequent sections in this chapter.
Search WWH ::

Custom Search