Document Types

The first line of code above:

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

is called the “doctype” and it simply identifies what flavor of HTML you used to write the page. There are two common doctypes—HTML 4.01 and XHTML 1.0—and each has two different styles: strict and transitional. Dreamweaver can create any of these types of HTML documents—you simply tell it which flavor you want when you create a new web page (see Creating a Web Page) and Dreamweaver handles the rest.

But it’s important that you always use a doctype, because without one, different browsers display CSS differently, and your pages will look different depending on your visitor’s browser. Fortunately, you won’t have to worry about this issue as long as you create your pages in Dreamweaver.

Get Dreamweaver CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.