Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html] 第66天 HTML5如果不写<! DOCTYPE html> ,页面还会正常工作么? #403

Open
haizhilin2013 opened this issue Jun 20, 2019 · 3 comments
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第66天 HTML5如果不写<! DOCTYPE html> ,页面还会正常工作么?

@haizhilin2013 haizhilin2013 added the html html label Jun 20, 2019
@wenyejie
Copy link

会啊! 只是有时候不是按照你想的那种情况来工作, 不过浏览器认为那是正常的
doctype就是声明文档类型, 它的影响范围包括HTML, CSS, DOM, 等
如果不声明文档类型, 浏览器就会按照自己的理解(规则)默认帮你声明一种类型. 具体看浏览器行为

@yxkhaha
Copy link

yxkhaha commented Jun 21, 2019

  • 页面添加了<! DOCTYPE html>说明该页面采用了W3C标准,如果不加则页面会根据浏览器自身的解析标准来解析,这可能会导致页面在不同的浏览器呈现出不同的效果。

@MrZ2019
Copy link

MrZ2019 commented Jan 6, 2021

  • 页面添加了<! DOCTYPE html>说明该页面采用了W3C标准,如果不加则页面会根据浏览器自身的解析标准来解析,这可能会导致页面在不同的浏览器呈现出不同的效果。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

4 participants