Providing Solutions For Web Development Languages and Platforms

Doctype HTML Enhances Web Page Readability For Browsers

doctype html declaration

Doctype HTML Declaration or Document Type Declaration or <!DOCTYPE> is not really a tag. It’s just to inform Web browser about the version of HTML you are using in your document.

Doctype Syntax for document type declaration in HTML5

Syntax to declare doctype for html5 is damn easy as shown a simple declaration below :

<!DOCTYPE html>

Doctype html5 is that much short only. Other versions includes a long doctype declaration which perfectly specifies What does doctype html mean?.

An example showing HTML5 doctype declaration

<!DOCTYPE html> <!--- Doctype HTML Declaration telling browser about the version of html you are using. -->
        <title><!--- Document Title --></title>
        <!--- Body Area to be shown on Web Browser -->

Actually, different versions of HTML has different way of doctype declaration. Every possible way which describes the doctype html meaning discussed down below.

Browser Support

Element Chrome Edge Firefox Safari

Various DOCTYPE HTML Definition, Declarations and Examples


HTML5 is not based on SGML for rules specification. That’s why it has only one doctype declaration.

<!DOCTYPE html>

HTML 4.01 was completely based on SGML. That’s why all the rules for markup language was specified by DTD (Document Type Definition) to make browser understand the document perfectly.

HTML 4.01 Strict

This DTD strictly sets the document to be HTML 4.01 Strict. HTML 4.01 gives more importance to Structure over Appearance. Presentational or Deprecated Elements are not included in HTML 4.01 Strict. Best part is that by writing to HTML 4.01 Strict, one can achieve Structure rich documents that can easily adapt to different browsing situations.


HTML 4.01 Transitional

This DTD includes all HTML elements and attributes even the presentational or deprecated elements that are not included in HTML 4.01 Strict.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

HTML 4.01 Frameset

HTML 4.01 Frameset is somewhat similar to HTML 4.01 Transitional except that it allows the use of frames.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">

XHTML 1.0 Strict

This DTD is same to that of HTML 4.01 Strict as it includes all HTML elements and attributes except those which focuses on Presentation. It differs at one point as Markup must be written as well formed XML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

XHTML 1.0 Transitional

It is similar to HTML 4.01 Transitional as it contains all elements even presentational. It must also be written as well formed XML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

XHTML 1.0 Frameset

This DTD is similar to XHTML 1.0 Transitional. In extra, it allows the use of Frames.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "">


It is exactly similar to XHTML 1.0 Strict except the point that it allows addition of modules i.e. you can add ruby support for East Asian Languages.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

HTML 3.2

It is compatible to every browser currently in use. But it does not completely supports Stylesheets and even does not have elements as frames and internationalization.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

HTML 2.0

It is widely supported by most of the browsers. But it doesn’t supports tables, frames as well as most commonly used elements that make better appearance.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

Leave a Reply

%d bloggers like this: