HTML Doctype HTML Document Type Declaration
HTML Doctype Tutorial and Information







HTML Tutorial - HTML Doctype

The HTML DOCTYPE or Document Type Declaration builds the first line in every HTML document. The Document Type Declaration or DOCTYPE tells the web browser or an HTML validator what version of HTML is being used. The latest version of HTML is XHTML so we suggest to use an XHTML doctype where XHTML 1.0 Transitional is the most common HTML doctype declaration.

XHTML 1.0 Transitional Doctype

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.0 Transitional is an XML compatible version of HTML 4.0 and the most commonly used doctype declaration. XHTML 1.0 Transitional supports XHTML 1.0 Strict. The doctype XHTML 1.0 Transitional also allows the use of older elements and attributes to ease the transition from earlier HTML versions. This doctype allows HTML tags like: <center>, <u>, <strike>, and <applet>.

XHTML 1.0 Strict Doctype

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML 1.0 Strict is an XML compatible version of HTML 4.0 Strict and follows XML syntax rules. This doctype declaration does not allow HTML 4.0 tags as mentioned above.

XHTML 1.0 Frameset Doctype

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
The doctype declaration XHTML 1.0 Frameset is an XML compatible version of HTML 4.0 Frameset and follows XML syntax rules. XHTML 1.0 Frameset allows the use of an HTML frameset (frames site) used with earlier versions of HTML.

HTML 4.01 Transitional Doctype

<!DOCTYPE HTML 
      PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd"> 
HTML 4.01 Transitional tells the web browser or HTML syntax validator that this HTML document is declared HTML 4.01 Transitional, which includes all elements and attributes of HTML 4 strict, but adds a number of deprecated elements and attributes from earlier versions of HTML like:
BASELINE, UNDERLINE, APPLET

HTML 4.01 Strict Doctype

<!DOCTYPE HTML
      PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
      "http://www.w3.org/TR/html4/strict.dtd">
HTML 4.01 Strict tells the web browser or HTML syntax validator that this HTML document is declared HTML 4.01 Strict, which is a compressed version of HTML 4.01 where deprecated elements as mentioned in HTML 4.01 Transitional, frames, and link targets are not allowed. HTML documents written in doctype declaration HTML 4.01 Strict adapt better to style sheets and different web browsers.

HTML 4.01 Frameset Doctype

<!DOCTYPE HTML
      PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
      "http://www.w3.org/TR/html4/frameset.dtd">

HTML 4.01 Frameset tells the browser or HTML syntax validator that this HTML document is declared HTML 4.01 Frameset, which is recommended for sites that use frames.




HTML and XHTML Tutorials

HTML Related Links

© This Article is Copyrighted by WebmasterSeminar.com

Please do not copy or reproduce this article in whole or part, in any form, without mentioning the source and including a live link back to WebmasterSeminar.com - Thank You!

LINK TO THIS TUTORIAL:


Copy the code below and paste into your web page
<a href="http://www.webmasterseminar.com/htmldoctype.php">
Webmaster Seminar</a><br />
HTML Doctype - Free Information, Tutorials and HTML Resources