“转换” XHTML 1.0 严格到 HTML5
好的,各位,
我有一个有效的 XHTML 1.0 Strict 网页。我知道 XHTML 和 HTML 之间的差异,但是 XHTML 和 HTML 5 之间有什么差异?
“转换”是否像更改 Doctype 一样简单,并且仍然可以验证?
或者,是否存在需要首先更改的标记差异?
谢谢!
杰克
OK folks,
So I have a valid XHTML 1.0 Strict webpage. I'm aware of the differences between XHTML and HTML, but, what are the differences between XHTML and HTML 5?
Would a 'conversion' be as easy as changing the Doctype, and it would all still validate OK?
Or, are there markup differences that would need to be changed first?
Thanks!
Jack
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
总结这篇文章和这篇文章...
要开始利用 HTML5 的优势,您所需要做的就是将文档类型从 XHTML 转换为 HTML5。 HTML5 与 XHTML 兼容。
如果您想引入新的 HTML5 标签,您还需要添加一个诸如 Modernizr 之类的填充,以便 Internet Explorer 能够弄清楚如何呈现新的 HTML5 元素。
To summarize this post and this post...
All you need to do to start taking advantage of the benefits of HTML5 is to convert your doctype from XHTML to HTML5. HTML5 is compatible with XHTML.
If you want to introduce new HTML5 tags, you will also want to add a polyfill like Modernizr so that Internet Explorer can figure out how to render the new HTML5 elements.