PDA

View Full Version : Doctype help


lizzieish
02-24-2010, 08:35 PM
Hello!

As some of you know, I am sorting out my website as it was missing vital things!

Now, I found this link

http://www.w3schools.com/tags/tag_DOCTYPE.asp

With all different doctype coding, but how do I know which to use? I have been reading tutorials recommended but none of them mention doctypes.

Thankyou for any help,

Lizzie x

Edit:

I just used the same websites Markup Validation Service, and it came up with errors (shocker) and said:

http://i155.photobucket.com/albums/s310/hellokittybuzz/Website%20Posts/Picture3-4.png

So, does this mean I need to use this doctype:

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

?

Thanks! x

gentleone
02-24-2010, 09:10 PM
If you check your page at validator.w3c.org and you didn't declare a doctype on your page then the validator will take as default the HTML 4.01 Transitional and check the page with this docvtype.

Which doctype you have to choose depends on what you want with your website, but with just plain old HTML you can use the HTML 4.01 Transitional.
Check this link with the different doctypes there are and with some explanation for what kind of web pages they're suitable are.
http://www.htmlhelp.com/tools/validator/doctype.html

lizzieish
02-25-2010, 12:19 AM
Thankyou very much for the article!

I now have one more question on this subject, do I need to put the Doctype code on every page on my site, or just the index page?

Thankyou again!

x

edbr
02-25-2010, 01:17 AM
use it on all ,

lizzieish
02-25-2010, 01:29 AM
Thankyou, I had a look on nearly every webpage I have bookmarked to see what they did!