Rajdeep Singh.

Doctypes in HTML?

Doctypes in HTML 5 tells the Browser the Version of the HTML File.

By html 1 min read

Doctypes in HTML 5 Tells browsers to understand the version of HTML. The document is written for better interoperability.

You should always include the declaration at the top of the HTML document file before Write the <html> tag.

HTML 5 Doctype declaration:

<!DOCTYPE html>

HTML 5 Doctype Example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML 5 Doctype declaration</title>
</head>
<body>
    <div>
       <h1> HTML 5 Doctype declaration</h1> 
    </div>
</body>
</html>

Currently, Every Code Editor Like Vscode, Atom, Notepad++and other Code Editor. By Default With Shortcut key, add Doctype Html5 code on your File.

In Vscode Editor For Html 5 Doctype Shortcut key ! Type In Your File Vscode Emmet Abbreviations Automatic Add Html Doctype Example code on your file.