HTML5有效的名称空间标签前缀 [英] HTML5 valid namespace tag prefixes
问题描述
在验证我的页面时,W3-Validator为每个
When validating my page, the W3-Validator gives me an error for every
<tag addthis:title="AddThis share title" />
属性。如何让这些属性对HTML5有效,以便页面验证?我需要这些标签,所以addthis使用正确的标题为我的共享链接,所以我不能摆脱他们... ... $ / $>
attribute in my code. How can I make those attributes valid for HTML5, so the page validates? I need those tags so addthis uses the correct titles for my sharing links, so I can't get rid of them...
推荐答案
<你不能使它们有效。不在HTML中,不在XHTML中。 HTML5中允许的唯一有效的自定义属性开始data - 。
You can't make them valid. Not in HTML, not in XHTML. The only valid custom attributes allowed in HTML5 start "data-".
你可以让你的标记有效的HTML5 +东西或XHTML5 +的东西,但得到一个验证器来检查这是一项不重要的任务。
You could make your markup valid HTML5+something or XHTML5+something, but getting a validator to check for that is a non-trivial task.
这篇关于HTML5有效的名称空间标签前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!