[thelist] What is DOCTYPE?

Eric Vitiello evolt at perceive.net
Tue Feb 19 10:56:46 CST 2002


-- John Craft [Tue, 19 Feb 2002 10:32:47 -0600]:
>I've seen mentioned on this newsletter various problems with
>including DOCTYPE in HTML, but I don't really understand why that is.  I've
>also recently read somewhere (the site escapes me) a workaround that
>included not putting in the full URL in the DOCTYPE declaration.  Could someone
>please explain in more detail what DOCTYPE does and when and when not to
>use it? Does using DOCTYPE automatically validate your code with the W3?

the DOCTYPE declaration at the beginning of an XML/XHTML/HTML document defines the
standard that was used to created the document.

you should use a DOCTYPE at the top of every document.

it does not "automatically" validate the document. However, when using the w3c validator, it lets the validator know what to validate against, and it lets the browser know what standard to use for rendering.

with Internet Explorer 6, the DOCTYPE determines how the browser should render the pages.
you can read about it at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp


---
Eric Vitiello
Perceive Designs
<www.perceive.net>





More information about the thelist mailing list