Do I Need a 'document type' on my site?

mattk

Free Member
Dec 5, 2005
2,579
974
50
Swindon
It's something that goes at the top of your page, above the html tag and looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

You can validate your page here:

http://validator.w3.org/

But be warned, once you start validating your pages it's like joining a cult. You won't sleep until all your pages validate and it's likely to drive you slightly mad!
 
Upvote 0

mattk

Free Member
Dec 5, 2005
2,579
974
50
Swindon
For your site, which is HTML 4, I'd use this DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Depending on how your site is structured you should be able to add it at the very top of each page using your standard header.
 
Upvote 0

Latest Articles