<!DOCTYPE html>
You must have seen this phrase at the top of the html file.
FOR EXAMPLE :-
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
In this on the top we can see the declaration of <!DOCTYPE html> in the parenthesis like the opening tag of the html elements.
But it is not the HTML tag. It is just used in the HTML document to give information to the browser that the document type which it is epected to be the HTML. So due to this browser has not to search out the type of file and it will directly act according to the HTML file.
Tip: The <!DOCTYPE> declaration is NOT case sensitive.
Examples
<!DOCTYPE html>
<!DocType html>
<!Doctype html>
<!doctype html>
These all are correct as it is not case sensitive Browser will automatically interpret it.
Comments
Post a Comment