+ 2

Why is this <!DOCTYPE html>used

15th Jun 2018, 12:39 PM
MOVIE TRAILER
MOVIE TRAILER - avatar
5 odpowiedzi
+ 1
for telling to browser which version of html is in use : https://www.w3schools.com/tags/tag_doctype.asp
15th Jun 2018, 12:41 PM
Rambod Gh
Rambod Gh - avatar
+ 8
<!doctype html> is used to specify the type of html you are coding that is the type named html5
16th Jun 2018, 7:23 PM
Swapnil
Swapnil - avatar
+ 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
15th Jun 2018, 12:52 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 2
to let your device know its written in html5
15th Jun 2018, 12:41 PM
Roel
Roel - avatar
+ 1
To tell that the html code is written in the latest version of html which is html5 for now.
16th Jun 2018, 8:00 AM
Prakher Srivastava
Prakher Srivastava - avatar