Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the <i> tag use for?

Tags:

html

css

tags

Well I know it is meant to italicize text, but I have been using firebug on Facebook and I cannot help but realize how much they use the <i> tags in their layout.

i tag in Facebook photo layout

For example, for the photo thumbnail gallery, Facebook uses the <i> tag inside a div and places a background image style for the tag in the photo gallery. Are there more tricks/tips/uses to the tag ?

like image 220
Ben Avatar asked Mar 09 '11 06:03

Ben


People also ask

Why do we use I tag for icons?

To insert an icon, add the name of the icon class to any inline HTML element. The <i> and <span> elements are widely used to add icons. All the icons in the icon libraries below, are scalable vector icons that can be customized with CSS (size, color, shadow, etc.)

How do you use italic tags in HTML?

To make text italic in HTML, use the <i>… </i> tag or <em>… </em> tag. Both the tags have the same functioning, but <em> tag is a phrase tag, which renders as emphasized text.

What does I class mean in HTML?

Classes (i.e. class names) are used for styling the i element. Multiple class names are separated by a space. JavaScript can use class names for fast access to one or more elements.

What are the types of tag?

The HTML tags can also be simply divided based on basic categories like Basic HTML Root Tags, Formatting tags, Audio and Video Tags, Form and Input Tags, Frame Tags, Link Tags, List Tags, Table Tags, Style Tags, Meta Tags, etc.


1 Answers

The i element has not been deprecated (contrary to popular belief), but its use to strictly italicize text has been.

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

Source.

The last time I personally used it was to markup the scientific names of plants, eg...

<i>Anredera cordifolia</i> (Madiera Vine) 

Update

The reason Facebook may use it is because they deal with millions of concurrent requests - sending i down instead of span saves some bytes. Using it also doesn't suffer in readability too bad, as opposed to changing that class from tagWrapper to a.

If you want to see byte saving to the extreme, look at Google's home page source.

like image 186
alex Avatar answered Oct 12 '22 23:10

alex