What is DOCTYPE in HTML?
The <!DOCTYPE> declaration tells the browser which version of HTML the page uses, so it can show the page in the correct way. In HTML5 it is very short, and it must be the first line of the page.
<!DOCTYPE html>
<html lang="en">
...
</html>
It is not an HTML tag and it is not case-sensitive. In HTML 4 the doctype was long and had a link to a DTD file. HTML5 removed all that. See HTML Page Structure.
Learn more about the similar topics:
| Tutorials |
|---|
| HTML Introduction |
| HTML First Program using Notepad |
| HTML Page Structure |
| Exercises & Assignments |
|---|
| Steps to Create a Webpage in HTML using Notepad |
| Write an HTML program to display hello world. |
| Write an HTML program to create a page about yourself |