Searching for "Doctypes"

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