Searching for "Doctype"

Q:

Differentiate different types of Doctypes from one another.

Answer

Doctype helps the web browser to correctly render the web pages. There are different types of Doctype that are available and they are as follows:


=> Strict Doctype: it consists of all the HTML elements and it is also known as DTD (Document type definition) but it doesn't include the presentational and deprecated elements i.e. font, center, etc. Framesets related elements are also not allowed in this. For example:


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


"https://www.w3.org/TR/html4/strict.dtd">


=> Transitional Doctype: it consists of all the HTML elements and attributes. It is also known as DTD (Document type definition). It includes the presentational and deprecated elements i.e. font, center, etc. Framesets related elements are also not allowed in this. For example:


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


"https://www.w3.org/TR/html4/loose.dtd">


=> Frameset Doctype: it consists of all the HTML elements and attributes. It is also known as DTD (Document type definition). It includes the presentational and deprecated elements i.e. font, center, etc. Framesets related elements are also allowed in this. For example:


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


"https://www.w3.org/TR/html4/frameset.dtd">

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

Q:

What is the importance of Doctype in HTML?

Answer

Doctype tag is not a HTML tag, it is just an instruction that is passed to the web browser to check for the information that is being provided by the markup language in which the page is written. Doctype is sometimes referred as Document type definition (DTD) that describes some rules that has to be followed while writing the markup language so to make the web browser understand the language and the content correctly. Doctype is very important to be placed in the beginning of the HTML and before the <HTML> tag to allow easy rendering of the pages that are used.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology