Forum Moderators: open
Lots of threads around the forum about this, and some key things to pay attention to if you want to change it. A mismatch to your actual code can stop the newer browsers from rendering properly.
Try the Site Search for "DTD" for more details.
They tell the renderer which language the page is written in.
I'm going to go out on a limb and say that 4.0 or 4.1 Transitional is exactly the DTD you want to be using right now. It will give you all the latest additions to HTML while still allowing pages with outdated code to display properly.
Personally, I think that all pages should be in XHTML now. See this thread for the arguments: [webmasterworld.com ]
I don't use them on pages, never have. And a browser doesn't care which HTML version your page is using, as long as it's supported. I do however, use a doc type META tag and also declare the language and char set.
D C
The part you're missing, though, is that XHTML requires them and some time in the future it's going to be the standard.
Also, using DTDs forces you to write perfect code which can't be bad thing. :-)
I personally write all new code to be XHTML compatible (very simple to do) but for old sites I don't use DTDs at all.
While XML schemas might eventually replace DTDs, the spec for them was only just approved in May 2001. So there are virtually no tools or user agents that produce and/or use them. DTDs have been around from the 1970s, so there are many, many things that deal with them.