What is the meaning of DOCTYPE in HTML ?

  • Document type declaration otherwise known as Doctype is an instruction used by web browsers to fetch what version of HTML the website is written in.
  • For understanding, it helps browsers how the document should be interpreted thus eases the rendering process. It is neither a tag nor an element.
  • The top of the document was the Doctype should be placed.
  • It does not need a closing tag and does not contain any content.

Syntax:

<!DOCTYPE html>

For example,

[pastacode lang=”markup” manual=”%3C!DOCTYPE%20html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%20%20%20%20%20%3Ch1%3EWelcome%20to%20Kaashiv%20Infotech%3C%2Fh1%3E%0A%20%20%20%20%20%3Ch2%3EThis%20is%20HTML5%20Doctype%20Tag%3C%2Fh2%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E” message=”” highlight=”” provider=”manual”/]

Output

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like

What is the difference between SOAP and REST ?

                  SOAP                    REST It is a protocol. It is an architectural style. SOAP- Simple Object Access Protocol. REST- Representational State Transfer. It can’t use REST because it is a…
View Answer

What is Grid system ?

It is a structure comprising a series of vertical and horizontal lines which intersect and used to arrange content. Is a way of providing a system that designers can work with…
View Answer

What is Semantic HTML ?

It is essential to understand the meaning of words during communication in any language. It becomes more critical and provides more semantic elements which make it easy to understand the…
View Answer