---
title: "Tell me What is the <!DOCTYPE>? Is it necessary to use in HTML5"  
description: "Tell me What is the <!DOCTYPE>? Is it necessary to use in HTML5"  
author: "Anonymous User"  
published: 2012-09-06  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1516/tell-me-what-is-the-doctype-is-it-necessary-to-use-in-html5  
category: "html5"  
tags: ["html5"]  
reading_time: 2 minutes  

---

# Tell me What is the <!DOCTYPE>? Is it necessary to use in HTML5

The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. AND The <!DOCTYPE> tag does not have an end tag and It is not case sensitive.\
\
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag. As In HTML 4.01, all <! DOCTYPE > declarations require a reference to a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not require a reference to a Document Type Definition (DTD).

## Answers

### Answer by Anonymous User

The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. AND The <!DOCTYPE> tag does not have an end tag and It is not case sensitive.\
\
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag. As In HTML 4.01, all <! DOCTYPE > declarations require a reference to a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not require a reference to a Document Type Definition (DTD).


---

Original Source: https://www.mindstick.com/interview/1516/tell-me-what-is-the-doctype-is-it-necessary-to-use-in-html5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
