What is the purpose of the DOCTYPE declaration in HTML documents?

  • It acts as a comment for the developers. 
  • It defines the version of the CSS used. 
  • It determines the browser's rendering mode. 
  • It includes external scripts. 
The DOCTYPE declaration informs the browser about the type and version of the HTML used in the document. This ensures that the browser knows the set of rules to follow when parsing and rendering the page, which helps in consistent and correct page rendering. 
Add your answer
Loading...

Leave a comment

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