Standard (and valid) DOCTYPE definitions (DTDs)

Started by ganeshbala, Mar 14, 2009, 08:56 PM

Previous topic - Next topic

ganeshbala

Standard (and valid) DOCTYPE definitions (DTDs)

Web pages should include a valid DOCTYPE definition (DTD) at the beginning of the HTML document, not only to validate the page against it, but also to activate the standards compliant rendering mode in Internet Explorer 6, Mozilla/Firefox and Opera browsers. If a erroneous or incomplete DTD is used (e.g. you omit the URL part) the standards mode won't be activated and instead the legacy quirks mode will be used.

The Transitional DOCTYPE definition include deprecated tags like font and center, while Frameset DTDs should be used for pages containing frames (i.e. the pages that contain the frameset and frame tags). You can find below the diferent available definitions for HTML 4.01 and XHTML 1.0. They must be placed at the beginning of the (X)HTML file.
HTML 4.01

    * Strict:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    * Transitional1:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    * Frameset1:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 2

    * Strict:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    * Transitional1:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    * Frameset1:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">



-----------------------
Source : ampsoft