The DOCTYPE is a single line of code at the top of the document that identifies the SGML DTD the document is written for. Often, this is a version of HTML or XHTML.
For example: if you wrote your webpage to comply with HTML 4.01 Transitional, you would put the HTML 4.01 Transitional DOCTYPE in as the first line of the webpage. A List Apart recently wrote the correct DOCTYPEs for the 7 flavors of HTML everyone should be using, and they are listed below. If you still have no clue what I am babbling about, HTML Tidy will automatically insert the correct DOCTYPE for you.

  • HTML 4.01 Transitional
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
  • HTML 4.01 Strict
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
  • HTML 4.01 Frameset
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">
  • XHTML 1.0 Transitional
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
  • XHTML 1.0 Strict
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
  • XHTML 1.0 Frameset
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "">
  • XHTML 1.1
    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">



Log in or registerto write something here or to contact authors.