What is DOCTYPE in HTML and what is the significance of DOCTYPE?

Solution

The <!DOCTYPE> declaration is very first thing that is declared on the html document. It is known as Document Type Definition. It is used to tell the web browsers what version of HTML is being used in HTML document and how browser is going to render it.

You can declare doctype for HTML5 version as shown below:

<!DOCTYPE html>
<html>
  <head>
   <title>Title</title>
  </head>

  <body>
    Body Part
  </body>

</html>

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media