模板页面
http://www.blacktie.co/demo/kelvin包含我之前未见过的标签:< t>电子邮件< / t>
相应的CSS样式:#footwrap t {font-weight:700;}
我很好奇< t>的重要性.它没有在http://htmldog.com/reference/htmltags或我能找到的其他列表中列出.
这是自定义HTML标记吗?从我读过的有关自定义元素(例如http://www.html5rocks.com/en/tutorials/webcomponents/customelements)的内容中,您需要调用document.registerElement()或document.createElement(),但这似乎不是这里的情况.
此代码在语义上是否正确,还是应该写为:
<span class="t">Email</span> #footwrap .t {font-weight: 700;}
解决方法
是的,< t> tag是一个自定义元素.虽然自定义标签很有用,但如果您希望所有浏览器都支持它们,则必须使用JS注册该元素:
var tTag = document.registerElement('t');
More about custom tags here因此,要回答您的问题,编码无效,除非他们已使用JavaScript在浏览器中注册该元素.有时,它更容易使用一个类:D