What does <!doctype html> do?

后端 未结 6 442
面向向阳花
面向向阳花 2020-12-12 19:06

What does this tag do?

What I can see is that with this tag on top my html behaves in another way than without. How do I k

6条回答
  •  渐次进展
    2020-12-12 19:52

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

    The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.

    The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

    Quote from here: http://www.w3schools.com/tags/tag_doctype.asp

    :)

提交回复
热议问题