Depends exactly what you are coding in, HTML or XHTML. Once you know that then it is a process of choosing which type of doctype, transitional, strict, or frameset.
frameset- This one is obvious, if you are using frames, use this.
transitional- I am not sure if W3 meant this or not, but I usually think of transitional being used if you are transistioning between two languages (i.e. HTML and XHTML). It's less strict but still gets you going in the right direction.
strict- It's just that, strict. Everything has to be exactly according to w3 standards. This is the most standards compliant way of doing things and, as I see it, the only way coding should be done (unless of course you have frames).
And lets not forget the DTD to the module based XHTML (1.1)
Modularization takes markup and turns it into 'subsets' or abstract modules
For example, core modules would be:
Structural elements, Text containers, Hyperlinking, List oriented elements.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
And a few side notes:
the DTD will be placed ABOVE your html element <html>.
A DTD is NOT a regular element OR a comment tag,
it's important its not treated like either.
Also note, its important that DOCTYPE is in caps.
Moderator:General web building Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
Well, the browser will interpret the markup reardless of a Doctype. The Doctype is used to tell the browser what language is used, and where the base Document Type Declaration (W3's DTD file) is located. However, if you don't use valid code, then adding the Doctype is useless, as your browser uses its own DTD to translate the tags.