Web | This Site

XHTML Tutorial
XHTML References
XHTML Tools
XHTML Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# XHTML DOCTYPES

The XHTML standard defines three Document Type Definitions. The most commonly used and easy one is the XHTML Transitional document.

XHTML 1.0 document type definitions are corresponds to three DTDs: Strict, Transitional, and Frameset.

There are few XHTML elements and attributes which are available in one DTD but not available in another DTD. So while writing your XHTML document you must take care while selecting your XHTML elements or attributes. However XHTML validator will help you to identify valid and invalid elements and attributes.

Please check XHTML Validations for more detail on this.

## XHTML 1.0 Strict:

If you are planning to use strictly Cascading Style Sheet and avoiding to write most of the XHTML attributes, then it is recommended to use this DTD. A document conforming to this DTD will be of the best quality.

If you want to use XHTML 1.0 Strict DTD then you need to put following line at the top of your XHTML document.

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

## XHTML 1.0 Transitional:

If you are planning to use many XHTML attributes as well as few Cascading Style Sheet properties, then you should adopt this DTD and you should write your XHTML document according to DTD.

If you want to use XHTML 1.0 Transitional DTD then you need to pur following line at the top of your XHTML document.

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

## XHTML 1.0 Frameset:

You can use this when you want to use HTML Frames to partition the browser window into two or more frames.

If you want to use XHTML 1.0 Frameset DTD then you need to pur following line at the top of your XHTML document.

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

NOTE: No matter what DTD you are using to write your XHTML document, if it is a valid XHTML document then your document will be considered as a good quality document.

Advertisement

Online Image Processing

Indian Baby Names