Twitter seems to be using an <i/>
tag to display their icons from a css sprite. Did they just make up that tag, or is HTML I've never heard of?
Brilliant idea at any rate :)
Twitter seems to be using an <i/>
tag to display their icons from a css sprite. Did they just make up that tag, or is HTML I've never heard of?
Brilliant idea at any rate :)
They're probably using that to reduce HTTP payload, i.e. bandwidth cost.
I have seen people use empty style-oriented elements (e.g. <i/>
, <b/>
) as hooks for extra styling for UI widgets that are reused throughout a site. OOCSS does this. For example, the basic module's structure is defined as
<div class="mod">
<b class="top"><b class="tl"></b><b class="tr"></b></b>
<div class="inner">
<div class="bd">
<p>Lorem ipsum.</p>
</div>
</div>
<b class="bottom"><b class="bl"></b><b class="br"></b></b>
</div>
Then depending on your CSS (and the context where you use the module), those empty <b />
elements may receive styling to add e.g. border images, or they might receive no styling at all and have no impact on the page.
I couldn't find the tags you are referring to so I don't know if this is what Twitter is doing, but it is an interesting use of these tags regardless.