HTML Doctype Declaration | DTD definition in HTML5

HTML Doctype Declaration

HTML Doctype is an instruction to the browser to display the page according to the version of HTML. It must be on top of the page, means it must be first statement in any HTML web page. Syntax in HTML5 is <!DOCTYPE html>.

Warning: HTML Doctype Declaration is the first line of the any HTML Document.You do not have to write any things before this Doctype even space character.

It will provides the help to the browser to display the HTML Document.

Caution: Their are many versions of HTML, that is why, the use of HTML Doctype definition in HTML document is a good idea for the browser to identify which HTML version.

The syntax DOCTYPE in HTML Version 4.01 was relate to the DTD (Document Type Definition) because the HTML version 4.01 was base on the SGML (Standard Generalized Markup Language).

Document Type Definition means that, a set of structured elements and attributes which is used to provide markup to the website.

HTML Version 5 does not support the Document Type Definition because it is not based on the SGML (Standard Generalized Markup Language).

Note: The HTML <!DOCTYPE> declaration is not a HTML tag or element, it is just an instruction to the web browser.

HTML5 Doctype Syntax –

	<!DOCTYPE html>

Definition Syntax of HTML 4.01 Strict

The strict means only supported tags are in the Document Type Definition, all deprecated tags are not part of Definition. Framesets are not allowed.

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

Definition of HTML 4.01 Transitional

This version contains all HTML elements and attributes, currently and also previously supported tags. It means all deprecated tags are still part of It. Framesets are not allowed.

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

Definition Syntax of HTML 4.01 Frameset

This version contains all HTML elements and attributes, currently and also previously supported tags, or similar to the version 4.01 transitional. It also allows the use of frameset.

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

Declaration Syntax of XHTML 1.0 Strict

This version contains all XHTML elements and attributes which are currently supported, but does not contain deprecated elements. Framesets are not allowed. The markup must also be written as well-formed XML.

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

Declaration of XHTML 1.0 Transitional

This contains all HTML tag and attributes which are currently and also previously supported, deprecated tag are also included in It. Framesets are not allowed. The markup must also be written as well-formed XML.

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

The Syntax In XHTML 1.0 Frameset

This Document Type Definition contains all HTML elements and attributes which are currently and also previously supported tags, and also allows the use of frameset.

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

Syntax of XHTML 1.1

This Definition is equal to XHTML 1.0 Strict, also allows you to add modules (for example Ruby support for East-Asian languages).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
You can leave a response, or trackback from your own site.

One Response to “HTML Doctype Declaration | DTD definition in HTML5”

  1. Hiya, I am really glad I have found this info. Nowadays bloggers publish just about gossips and internet and this is actually irritating. A good site with interesting content, this is what I need. Thank you for keeping this web site, I’ll be visiting it. Do you do newsletters? Can not find it.

Leave a Reply to the article

Learning & Certifications
Follow Us
Facebook Icon   Linked In Icon   Twitter Icon  
Validation and Recognition

Valid CSS! Valid HTML5!