Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 612 Bytes

09.why-do-you-need-doctype-html.md

File metadata and controls

15 lines (8 loc) · 612 Bytes

09. Why do you need <!doctype html>?

  • DOCTYPE declaration must be the very first thing in HTML page.

  • <!doctyle html> is not a HTML tag but an instruction to browser about what version of HTML the page is written in.

  • <!doctyle html> helps to parse and render the HTML in standard mode across the different browsers.

  • If <!doctyle html> not provided, browser will render HTML page in quirks mode.

  • <!doctype> is not case sensitive. That means this is also <!DOCTYPE html> also correct.

Reference