You are here:About>Computing & Technology>Web Design / HTML> XML> DTDs
About.comWeb Design / HTML

DTDs and Doctype

Defining the DOCTYPE or DTD is vital to creating valid and usable XML documents. Also, many browsers will display Web pages differently depending upon what DOCTYPE you use. Be sure you know how to use DOCTYPE and DTDs effectively.
Understanding the Document Type Definition
DTDs or Document Type definitions are an integral part of XML. It is important to know what they are and how to read one, if not how to write your own.
Why Use DOCTYPE Declarations
Letting the Web browser know what to expect from your Web page HTML is a good idea. Some browsers will change how they display a Web page depending upon the presence or absence of a DOCTYPE definition. And Internet Explorer 6 has a special feature all it's own for handling issues with DOCTYPE.
DOCTYPE List
There are many potential Document Type Definitions you can use in your DOCTYPE declaration, this page will give you a list of the more common ones and how to choose the best one for your Web pages.
Parts of a DTD: Elements, Entities, Attributes, and Notations
DTDs or Document Type definitions are an integral part of XML. It is important to know what they are and how to read one, if not how to write your own.
A Sample DTD
See how a DTD could be written by reviewing this sample DTD.
Anatomy of a DOCTYPE
Understanding the syntax of the DOCTYPE statement makes it easier to remember to use them in your HTML and XHTML documents.
FAQ: What is a DTD?
A DTD is a document type definition.
Using !DOCTYPE
If you don't define the DOCTYPE or document type definition, newer browsers (version 6+) will assume you didn't write your markup to a standard and provide some strange results. Learn how to write a DOCTYPE that says what you mean and means what you say.
DTDs and Markup Languages
DTDs or Document Type Definitions are the basis of markup languages, including XML and HTML.
Quirks Mode - Using the DOCTYPE Tag
If you don't use the DOCTYPE tag, your Web pages won't display in standards compliant ways and might result in some strange Web pages.
The DOCTYPE Element
Tag library entry.
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.