Whats the point of DOCTYPE?

后端 未结 8 1062
夕颜
夕颜 2020-12-06 17:56

I know that different doctypes are essentially about how compliant the html is, but what difference does it make what doctype you specify? Do browsers handle the same code d

8条回答
  •  忘掉有多难
    2020-12-06 18:31

    The doctype declaration should be the first thing in an HTML document, before the tag.

    It isn't an HTML tag; it's an instruction to the web browser about what version of the markup language the page is written in.

    It's getting simpler with HTML5:

    If you don't have that proper doctype, the browser won't know to use HTML5.

提交回复
热议问题