HTML <!DOCTYPE> Declaration

The HTML <!DOCTYPE> isn’t a tag, it’s a declaration. It is the first thing you can see on any HTML Document. Add the doctype declaration to HTML Document, since it is an instruction to the browser. The instruction is to tell the web browser which HTML version to expect.

The following is an example showing doctype declaration in HTML,

Example

The following example shows how to correctly add <!DOCTYPE> to an HTML web page,

<!DOCTYPE html>
<html>
<head>
<title>Add Title</title>
</head>
<body>
<h1>Heading 1</h1>
<p>Add content</p>
</body>
</html>

Here’s the output,

HTML5 Doctype Declaration

 

HTML5 SVG (Scalable Vector Graphics)
HTML a Tag
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment