Syntax of Declaring Doctype html public

doctype in HTML

The <!doctype > is the way to declare or instruct your web browser that which version of HTML you are going to use to write a web page. This definition is also called Document type Definition or DTD.

The DOCTYPE HTML public is used for HTML 4.01 version as well as XHTML 1.0. Different types of declarations are shown below.

For HTML 4.01

For HTML 4.01 there are three types of declarations: Strict, Frameset and Transitional. Each will be declared as <DOCTYPE html public> as follows:

For HTML 4.01 Strict


HTML 4.01 Frameset

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

HTML 4.01 Transitional

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

Declaration for XHTML 1.0 and XHTML 1.1

XHTML 1.0 also has three types of declarations like HTML 4.01 as follows:

XHTML 1.0 Strict

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

XHTML 1.0 Frameset

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

XHTML 1.0 Transitional

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

Was this article helpful?

Related Articles

Leave A Comment?