Which Doctype should I go with? (transitional/xhtml...)?
Posted: Wed Aug 23, 2006 11:27 am
Hello Guys,
Just wanted to check and see if someone can point to a good resource on the internet that explains which doctype to use if you have used html in php with these kinds of tags:
or
notice the single quotes....
I tried using this line:
then I tried this:
This gave me 122 errors:
Thanks guys,
-Matt
Just wanted to check and see if someone can point to a good resource on the internet that explains which doctype to use if you have used html in php with these kinds of tags:
Code: Select all
<img src='images/next.gif'>Code: Select all
<div id='tagit'>I tried using this line:
Code: Select all
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html>
<head>
...
</head>";but this gives me the following types of errors:
Result: Failed validation, 300 errors
etc. etc. etc.Error Line 5 column 72: end tag for "meta" omitted, but OMITTAG NO was specified.
...ype' content='text/html; charset=iso-8859-1'>
Info Line 5 column 0: start tag was here.
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
then I tried this:
Code: Select all
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
...
</head>";such as:Result: Failed validation, 122 errors
Now, I know 122 is much better than 300 errors, but is 4.01 transitional/loose.dtd the correct type to be using?Error Line 17 column 6: end tag for element "HEAD" which is not open.
</head>
Error Line 18 column 50: document type does not allow element "BODY" here.
<body bgcolor='#FFFFFF' text='#000000' id='type-c'>
Thanks guys,
-Matt