What happens if I don't put a <!DOCTYPE html> in my code? Will it make any major changes?

后端 未结 3 1518
轻奢々
轻奢々 2020-12-09 09:55

I\'m working on several projects with HTML, and sometimes I forget to put . Will it make any big or noticeable changes?

3条回答
  •  醉梦人生
    2020-12-09 10:08

    The declaration must be the very first thing in your HTML document, before the tag.

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

    A lot of IDEs allow users to leave this out and default to a certain HTML style, but leaving it out does pose a potential threat in browser compatibility and the use of older versions of HTML.

    For example: new features & tags in HTML5 such as

    ,< footer >,
    ,
提交回复
热议问题