Home HTML HTML DOCTYPE Tag with Example

HTML DOCTYPE Tag with Example

10
0

HTML <!DOCTYPE> tag is the first statement of HTML document which represents a document type. HTML DOCTYPE declaration is used to instruct web browsers about which version of the HTML document written in. HTML DOCTYPE declaration does not have any end tag and not case-sensitive.

Available Common DOCTYPE Declarations

HTML supports different versions of DOCTYPE declarations. Some common DOCTYPE declarations are as below.

HTML 4.01 Strict

HTML 4.01 Strict allows you to use all HTML tags/elements, attributes but does not support presentational content and framesets.

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

HTML 4.01 Transitional allows you to use all HTML tags/elements, attributes plus support presentational content but does not allow framesets.

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

HTML 4.01 Frameset is same as HTML 4.01 Transitional plus allows framesets.

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

HTML 5 DOCTYPE declaration is the latest document declaration type and yet NOT a standard type.

<!DOCTYPE html >
Tip: You can see the complete List of HTML Elements here.
Previous articleWhat is HTML?
Next articleHTML Comment Tag with Example
Hi there, I am Mayank, the man behind Technical Mack. I started AspnetO with a motive to educate people on various programming languages ranging from beginners to expert level. Through this blog, I aim to provide more insightful content.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

1 × four =