+ 2
Why is this <!DOCTYPE html>used
5 Respostas
+ 1
for telling to browser which version of html is in use :
https://www.w3schools.com/tags/tag_doctype.asp
+ 8
<!doctype html> is used to specify the type of html you are coding that is the type named html5
+ 4
In the old days of the web, pages were typically written in two versions: One for Netscape Navigator, and one for Microsoft Internet Explorer. When the web standards were made at W3C, browsers could not just start using them, as doing so would break most existing sites on the web. Browsers therefore introduced two modes to treat new standards compliant sites differently from old legacy sites.
There are now three modes used by the layout engines in web browsers: quirks mode, almost standards mode, and full standards mode. In quirks mode, layout emulates nonstandard behavior in Navigator 4 and Internet Explorer 5 for Windows that is required not to break existing content on the Web. In full standards mode, the behavior is (hopefully) the behavior described by the HTML and CSS specifications. In almost standards mode, there are only a very small number of quirks implemented.
https://stackoverflow.com/questions/16259101/why-is-it-necessary-to-use-doctype
+ 2
to let your device know its written in html5
+ 1
To tell that the html code is written in the latest version of html which is html5 for now.