我应该使用< i>标记图标而不是< span> ;? [英] Should I use <i> tag for icons instead of <span>?
问题描述
我查看了Facebook的来源,他们使用< i>
标签显示图标。
另外,今天我看了一下Twitter的Bootstrap。它还使用
< i>
标签显示图标。 但是,
来自 HTML5规范:
I元素表示以替代语音或情绪
或以其他方式偏离正常散文的文本范围,例如分类学
指定,技术术语,来自另一
语言的惯用语,思想,船名或某些其他散文,其典型
印刷介绍以斜体表示。
为什么他们使用< i>
标签显示图标?
这不是一个坏习惯吗?
或者我在这里丢失了什么?
我正在使用 更新: Bootstrap 3现在使用 为什么他们使用 因为它是: 这不是一个坏习惯吗? 可怕的做法。这是性能胜过语义的胜利。 I've looked into the source of Facebook, they use the Also, today I looked into Twitter's Bootstrap. It also uses But, From the HTML5 spec: The I element represents a span of text in an alternate voice or mood,
or otherwise offset from the normal prose, such as a taxonomic
designation, a technical term, an idiomatic phrase from another
language, a thought, a ship name, or some other prose whose typical
typographic presentation is italicized. Why are they using Is it not a bad practice? Or am I missing something here? I am using Update: Bootstrap 3 now uses Why are they using Because it is: span $
显示图标,它似乎对我至今仍然有用。
span
作为图标。 官方文档
< i>
标签显示图标?
<i>
tag to display icons.<i>
tag to display icons.
<i>
tag to display icons? span
to display icons and it seems to be working for me till now.span
for icons. Official Doc
<i>
tag to display icons ?
Is it not a bad practice ?
Awful practice. It is a triumph of performance over semantics.
这篇关于我应该使用< i>标记图标而不是< span> ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!