Doctypes: We have to write doctype html at the beginning of html file. The long form of doctype is 'document type'. Doctype HTML helps all browsers to display/load HTML files or web servers. Doctype is 5th version of HTML. Doctype declaration is not an HTML tags and belong at the vary top of a document.
Adding the Doctypes with Basic Structure:
Doctype should always be included at the top of the HTML document, before the <HTML> tag.
<!DOCTYPE html>
<html>
<head>
<title> Adding Doctype </title>
<head>
<body>
<h1> Successfully added <!DOCTYPE html> in html file.
</body>
</html>
HTML 5 Declaration:
<!DOCTYPE html>
Doctype some case is not valid for crate a code.
- <!doctype html>
- <!DocTYpe html>
- <!doCtyPe html>