Maccabee
Mar 27 2008, 04:48 PM
I sort of getting the finishing touches for my site and I put up my meta tags but one thing I see on sites that I dont understand is their doctypes?
Something that looks like this for example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
That goes before the head.
So what does that do and how do I pick which one I need?
libertie
Mar 27 2008, 04:52 PM
From
http://validator.w3.org/docs/help.html :
QUOTE
No DOCTYPE Declaration Found!
A DOCTYPE Declaration is mandatory for most current markup languages and without one it is impossible to reliably validate a document.
One should place a DOCTYPE declaration as the very first thing in an HTML document. For example, for a typical XHTML 1.0 document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Title</title>
</head>
<body>
<!-- ... body of document ... -->
</body>
</html>
Also,
Choosing a Doctype and a
List of Recommended Doctypes.