What are common DOCTYPES?

In HTML file there are several DOCTYPES according to tag which we are using. These DOCTYPES helps browsers to know the type of document to expect. DOCTYPES is not HTML tag, it gives instruction to browsers about the version of HTML used in writing the HTML page. We will discuss all major type of DOCTYPES.

 

HTML 5

<!DOCTYPE html>

 

HTML 4.01 Strict

This Document Type Definition contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements. Framesets are not allowed.

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

 

HTML 4.01 Transitional

This Document Type Definition contains all HTML elements and attributes, INCLUDING presentational and deprecated elements. Framesets are not allowed.

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

 

HTML 4.01 Frameset

This Document Type Definition contains all HTML elements and attributes, INCLUDING presentational and deprecated elements, allows the use of frameset content.

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

 

XHTML 1.0 Strict

This Document Type Definition contains all HTML elements and attributes, but does NOT INCLUDE presentational or 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">

 

XHTML 1.0 Transitional

This Document Type Definition contains all HTML elements and attributes, INCLUDING presentational and deprecated elements. 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">

 

XHTML 1.0 Frameset

This Document Type Definition contains all HTML elements and attributes, INCLUDING presentational and deprecated elements, allows the use of frameset content. The markup must also be written as well-formed XML.

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

 

XHTML 1.1

This Document Type Definition is equal to XHTML 1.0 Strict, but allows you to add modules (it provide ruby support for East-Asian languages).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

 

Written by Ranjeet Jha

Ranjeet Jha

Hey there! My name is Ranjeet. I’m a Web Designer & Front-end Developer. I design, code, build & promote all things HTML5, CSS3, JavaScript & jQuery. In this blog you will find solutions of day to day problems faced by you.. Enjoy Coding..

Leave a Reply

Your email address will not be published. Required fields are marked *