!DOCTYPE HTML PUBLIC code (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


MonaE -> !DOCTYPE HTML PUBLIC code (11/14/2007 13:51:23)

Hello,

I am trying to make my webpages validated by W3C standards. I am using FrontPage 2003. How do I get it to create a genuine doctype code? ie.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

I can copy and paste, but want to make sure the code is a true reflection of the website.

Thanks,
MonaE




Tailslide -> RE: !DOCTYPE HTML PUBLIC code (11/14/2007 14:11:55)

This is the full DOCTYPE for HTML 4.01 Transitional:

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


Ideally you want to code your site to the DOCTYPE rather than the other way around - if you see what I mean!




MonaE -> RE: !DOCTYPE HTML PUBLIC code (11/14/2007 14:14:35)

Thank you,

If I place on my website, does that mean it is all that it claims?




Tailslide -> RE: !DOCTYPE HTML PUBLIC code (11/14/2007 14:28:11)

A DOCTYPE is just a label - it tells the W3C validator that you're intending to use a certain flavour of HTML so that the validator can know which set of rules to check and what set of errors to throw back at you.

A web browser will see a complete doctype (no matter which one) and will read your page using "Standards Mode" which (should) mean that they all use the same set of rules to interpret the code. Without a full DOCTYPE browsers rely on their error handling routines to guess what you want - and these error handling routines are all different so it's harder to get cross-browser consistency.

Using a particular DOCTYPE won't make your code correct.

All it does is help you spot coding errors via the validator (which will hopefully help with cross-browser issues) and switch browsers into Standards Mode (which also helps cross-browser issues).

The only exception to this off the top of my head is using frames - if you use the wrong DOCTYPE when you're using frames then the whole thing goes cablooey!

Think of a DOCTYPE as a book cover - it doesn't make the book any better, it just helps you know what you might be in for and you'd be much better off always using one!




MonaE -> RE: !DOCTYPE HTML PUBLIC code (11/14/2007 14:40:39)

Thank you.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875