Tutorials.

+ HTML

+ CSS

+ XHTML

+ JavaScript

XHTML DOCUMENT TYPE DEFINITIONS (DTD)




Strict DTD
The Strict document type, is used if you want a clean, precise markup. As its name suggests, there are many more restrictions using this doctype, for example, you can't use it if your document contains frames. It is used together with Cascading Style Sheets (CSS). To use this doctype, insert the following code at the start of your document's source:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


back to top

Transitional DTD
The Transitional DTD is probably the most commonly used document type. (I use this one) It has a lot less restrictions as compared to the Strict document type, and you should use this if you're working with tables and if you want to use targets. To use this doctype, insert the following code at the start of your document's source:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


back to top

Frameset DTD
The Frameset DTD is simply used when you are working with frames and iframes. To use this doctype, insert the following code at the start of your document's source:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">


back to top



HTML Tutorials    XHTML    Document Type Definitions    DTD