-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.txt
More file actions
27 lines (18 loc) · 826 Bytes
/
Copy path5.txt
File metadata and controls
27 lines (18 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
5. What is the DOCTYPE Declaration in HTML?
Ans :
All HTML documents must start with a <!DOCTYPE> declaration.
HTML <!DOCTYPE> tag is used to inform the browser about the version of HTML used in the document. It is called as the document type declaration (DTD).
Technically <!DOCTYPE > is not a tag/element, it just an instruction to the browser about the document type. It is a null element which does not contain the closing tag, and must not include any content within it.
In HTML 5, the declaration is simple:
<!DOCTYPE html>
The <!DOCTYPE> declaration is NOT case sensitive.
Let's see an example of HTML document with doctype declaration.
<!DOCTYPE html>
<html>
<head>
<title>This is the title</title>
</head>
<body>
This is the content of the document.
</body>
</html>