简体   繁体   English

这个标签的含义是什么: <t> lorem ipsum </t>

[英]What is the meaning of this tag: <t>lorem ipsum</t>

The template page http://www.blacktie.co/demo/kelvin contains a tag I haven't seen before: <t>Email</t> 模板页面http://www.blacktie.co/demo/kelvin包含我以前从未见过的标签: <t>Email</t>

The corresponding CSS styles this: #footwrap t {font-weight: 700;} 相应的CSS样式: #footwrap t {font-weight: 700;}

I'm curious as to the significance of the <t> . 我很好奇<t>的重要性。 It's not listed at http://htmldog.com/reference/htmltags or other lists I can find. 它没有列在http://htmldog.com/reference/htmltags或我能找到的其他列表中。

Is this a custom HTML tag? 这是自定义HTML标记吗? From what I've read about custom elements (eg http://www.html5rocks.com/en/tutorials/webcomponents/customelements ) you need to call document.registerElement() or document.createElement() but this doesn't seem to be the case here. 从我读到的自定义元素(例如http://www.html5rocks.com/en/tutorials/webcomponents/customelements ),您需要调用document.registerElement()document.createElement()但这似乎不在这里是这样的。

Is this code semantically correct, or should it be written as: 此代码在语义上是否正确,还是应该写为:

<span class="t">Email</span>

#footwrap .t {font-weight: 700;}

Yes, the <t> tag is a custom element. 是的, <t>标签是一个自定义元素。 While custom tags can be useful, if you want them supported in all browsers, you have to register the element with JS: 虽然自定义标签很有用,但如果您希望所有浏览器都支持它们,则必须使用JS注册该元素:

var tTag = document.registerElement('t');

More about custom tags here 更多关于自定义标签的信息
So to answer your question, the coding is not valid, unless they have registered the element with the browser with JavaScript. 因此,要回答您的问题,编码无效, 除非他们已使用JavaScript在浏览器中注册该元素。
Sometimes, its just easier to use a class :D 有时,它更容易使用一个class :D

This may be completely wrong, but t is not a real HTML tag. 这可能完全错误,但t不是真正的HTML标记。 Therefor I assume it is a XHTML item. 因此我假设它是一个XHTML项目。 So yes if it IS XHTML then that would be correct, and the class would not be (unless that was the name of it of course). 所以是的,如果它是XHTML那么那将是正确的,并且类不会(除非那是它的名称)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM