WengerEnterprises
    Simplifying Web Design


Pages

Tools

Webmasters


    

The DOCTYPE

The doctype is a fairly confusing tag to start out with. In fact, it's not really a tag at all, but it works similarly. It declares what type of HTML you are about to use. Some webmasters don't use the doctype, others do, but it's not something that makes anything visual happen on the screen.

If you do decide to use it, it will be the first thing on your page, which is why we'll start here. It's not so easy as to just put something down though, you need to decide between three different types of doctype.

If you make your page strictly conform to the standard, you will want to use the first doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

That's it. Just copy that line to your file editor at the top. However, some tags that are taught in this tutorial don't conform to this strict standard. What now? You use the loose conformance doctype, which is what this site uses:

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

As before, it's the first thing on your file. Finally, there is a third type of doctype. Fortunately for you, this doctype is only used on "Framesets", which we'll talk about later. Come back to this once you've learned framesets (don't worry, we'll remind you).

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">

This lesson may confuse you, but just keep this in mind as you go into your next lesson, HTML structure. You'll learn to begin creating the stuff you can see next.

The Next HTML Lesson


©WengerEnterprises.com - All Rights Reserved

Privacy Policy