Computer Science, asked by tanya1579, 1 month ago

3. Why do we write <!DOCTYPE HTML> as the first
statement in an HTML document?​

Answers

Answered by manishjha580
2

Answer:

Doctype stands for Document Type Declaration. It informs the web browser about the type and version of HTML used in building the web document. This helps the browser to handle and load it properly.

Answered by anindyaadhikari13
2

Answer:

  • <!DOCTYPE html> - It specifies the html version.

Explanation:

  • <! DOCTYPE html> is the first statement in an HTML document. doctype means document type.

  • It is a comment that tells the brówser which version of html it is using.

  • HTML 5 is the latest version of HTML at present. If you want to user HTML 5, then mention the line - <!DOCTYPE html> at the beginning of the códe.

  • For others versions like HTML 4.01, we write - <!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http: // www. w3. org /TR/html4/loose . dtd "> There is no need to remember this.
Similar questions