VS 2012 RC中的所有新HTML文档类型是什么? [英] What are all the new HTML document types in VS 2012 RC?
问题描述
我刚刚安装了VS 2012 RC,并在HTML工具栏下拉菜单中添加了一些新选项:
两个HTML5选项?我认为HTML5的建议不是指定一个DOCTYPE,所以第一个选项有点像你喜欢那个咖啡因咖啡因吗?。
我很确定W3C放弃了XHTML以支持不断发展的HTML,那么这个新的XHTML5选项是什么?更新:好像维基百科有一个答案。
预先感谢!
更新:发布了新问题的未答复位。
PS:我不是在寻找关于下拉菜单目的的解释,而是解释了选择DOCTYPE:HTML5 和HTML5。
关于HTML5与DOCTYPE:HTML5问题,以下是我在使用VS 2012 RTM:
DOCTYPE:{value}选项告诉VS检查您的页面,并尝试从DOCTYPE和html标签中找出应用哪种验证级别。例如,如果我创建了一个以如下开头的页面:
<!DOCTYPE html>
< html>
...
然后DOCTYPE:{value}选项变为DOCTYPE:HTML5。但是,如果我的页面是这样开始的:
<!DOCTYPE html>
< html xmlns =http://www.w3.org/1999/xhtml>
...
然后它变成DOCTYPE:XHTML5。
没有DOCTYPE:前缀的选项会强制VS使用选定的验证级别,而不管网页的结构/内容可能暗示什么。
I just installed VS 2012 RC and in the HTML toolbar dropdown it has a bunch of new options:
- DOCTYPE: HTML5
- HTML5
- XHTML5
What's the difference between the two HTML5 options? I thought the recommendation for HTML5 was not to specify a DOCTYPE, so the first option is kinda like "would you like some caffeine with that decaf?"
I was pretty sure that W3C abandoned XHTML in favor of evolving HTML, so what's this new XHTML5 option? Update: seems like Wikipedia had an answer for that.
Thanks in advance!
Update: posted a new question for the unanswered bits.
PS: I am not looking for an explanation of the purpose of the dropdown, but rather an explanation of what the difference is between choosing "DOCTYPE:HTML5" and "HTML5".
Regarding the HTML5 vs. DOCTYPE:HTML5 question, here's what I've observed while using VS 2012 RTM:
The DOCTYPE:{value} option tells VS to examine your page and attempt to figure out from the DOCTYPE and html tags what level of validation to apply. For example, if I create a page that begins as follows:
<!DOCTYPE html>
<html>
...
then the DOCTYPE:{value} option becomes DOCTYPE: HTML5. If, however, my page starts like this:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
...
then it becomes DOCTYPE: XHTML5.
The options that don't have the DOCTYPE: prefix force VS to use the selected level of validation regardless of what the structure/content of your page might suggest.
这篇关于VS 2012 RC中的所有新HTML文档类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!