[Solved] What means just “” in head of html page? [closed]


<!DOCTYPE html> is the explicit Document Type Declaration

From the linked page:

 The DOCTYPE Declaration (DTD or Document Type Declaration) does a couple of things:

     1. When performing HTML validation testing on a web page it tells the HTML (HyperText Markup Language) validator which version of (X)HTML
standard the web page coding is supposed to comply with. When you
validate your web page the HTML validator checks the coding against
the applicable standard then reports which portions of the coding do
not pass HTML validation (are not compliant).

     2. It tells the browser how to render the page in standards compliant
mode.

#2 is a very important reason for using it.

<!DOCTYPE html> , specifically, is the correct declaration for HTML5, and should be used pretty much from here to the near future. You can still use legacy strings or obsolete permitted strings, but the previously written format is all that is required in HTML5. On a further note, this DTD will cause all modern browsers dead link to switch to their standards (compliance) mode, even if they don’t support HTML5.

Here’s some more info:

Activating Browser Modes with Doctype

World Wide Web Consortium (they make web standards)

solved What means just “” in head of html page? [closed]