DOC type decleration

Associate
Joined
19 Jul 2006
Posts
1,847
i currently have
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
but when i validate my code i get errors as it contains align and target attributes
when i select html 4.01 Transitional from the validator option it passes.
whats the correct way to put this as the doc type i have tried
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/Transitional.dtd">
but it says thats wrong
TIA
 
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

or

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
if you are doing it the proper way :p
 
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
is the doctype you're after.

tsinc80697 said:
if you are doing it the proper way :p
Since when is having an XHTML 1.0 doctype in an HTML 4.01 document 'the proper way'?
 
A DTD (Document Type Declaration) simply provides an outline of what the document can do in regard to elements, attributes, entities etc.

Worth knowing at least what it is in layman's terms.
 
Back
Top Bottom