如果我使用HTML 5的文档类型,会发生什么? [英] If I use HTML 5's doctype, what will happen?

查看:100
本文介绍了如果我使用HTML 5的文档类型,会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在学习doctypes,并想知道<!DOCTYPE html> 和其他一些之间的区别是什么。



我知道<!DOCTYPE html> 是HTML5文档类型,它是实验性的,但我想知道如果我使用了会发生什么它取代了其他文档类型?



在此先感谢!!!!

解决方案

基本上会发生的是,您将以标准模式呈现您的页面。

如果您想使用XHTML 1.0标记并符合XHTML 1.0,您可能不应该使用新DOCTYPE的唯一原因。

现在使用HTML5的缺点是规格可能会改变。这对于你跟随规范的变化是很重要的。



据说,我已经开始在我的页面中使用新的语法。此外,它还可以确保您的网页持续很长很长的时间 的。



因此,请继续使用它(并学会如何简单地)。

I have recently been learning about doctypes, and was I wondering what the differences between <!DOCTYPE html> and some of the others were.

I know <!DOCTYPE html> is the HTML5 doctype and it is experimental, but I was wondering what would happen if I used it instead of the other doctypes?

Thanks in advance!!!!

解决方案

Basically what will happen is that you'll get your page rendered in a "standards mode".

The only reason why you probably shouldn't use the new DOCTYPE is if you want to use XHTML 1.0 markup and conform to XHTML 1.0.

The downside to using HTML5 now is that the spec can change. This makes it important for you to keep up with the spec as it actively changes.

With that being said, I've already started using the new syntax in my pages. Also it guarantees that your page will last for a very, very, long time.

So go ahead, use it (and learn to love how simple it is).

这篇关于如果我使用HTML 5的文档类型,会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆