<i> Idiomatic text
Text in another voice: foreign words, terms, thoughts, ship names. Italic.
<i> sets text apart from the surrounding prose. Typical cases are a technical term, a phrase in another language, a character's thoughts, a taxonomic name and the name of a ship.
It carries no stress; that is what <em> is for. Foreign phrases should also get a lang attribute so screen readers pronounce them properly. Using i for icons is a habit left over from icon fonts, and it means nothing.
The i element definition in the HTML standard (opens in a new tab) covers technical terms, foreign phrases, thoughts and ship names. The Strong and Emphasis lesson compares it with em.
Syntax
<i>text in another voice</i>When to use it
The <i> element is for text in a different voice from the prose around it: a species name in a nature blog, a stage direction in a play script, a dream sequence in a story, the name of a ship or train, or a word mentioned as a word, as in "the word their is often misspelled".
Pick the more specific element when one exists. A title of a book or film is cite. A term defined in that sentence is dfn. Stress that changes meaning is em. Only when none of these fits is i the right choice.
Two details are easy to miss. The standard recommends a class that explains each use, such as class="taxonomy" or class="stage", so different kinds of italic text can be styled differently later. And loan words that have become ordinary English, like cafe or piano, do not need i at all; mark only phrases your readers would still see as foreign.
Live example
Edit the code and watch the preview.
<p>The <i lang="la">Felis catus</i> is the common house cat.</p>
<p><i>Maybe I should leave now,</i> she thought.</p>More examples
Stage directions in a script
In a play script, stage directions are not spoken. They are a different kind of text, so i with a class sets them apart while the dialogue stays in normal type.
<p><b>ANNA:</b> Is anyone there?</p>
<p><i class="stage">She switches on the light and looks around the kitchen.</i></p>
<p><b>TOM:</b> Only me. I made pancakes.</p>Words mentioned as words
When you talk about a word rather than use it, typographic convention sets it in italics. The class records why the i element is there. Without it, readers could mistake the words for part of the sentence.
<p>The words <i class="term">their</i>, <i class="term">there</i> and <i class="term">they're</i> sound the same but mean different things.</p>Tip: Foreign phrase inside i? Add lang.
Browser support
i is supported by every browser and shown in italics by default. Like b, it was redefined in HTML5 with a meaning ("idiomatic text" or text in an alternate voice) instead of being removed, and it remains fully valid in the HTML Living Standard.
Accessibility
When an i element holds foreign words, give it a lang attribute and screen readers switch pronunciation (WCAG 3.1.2). The W3C note Understanding Language of Parts (opens in a new tab) explains the requirement.
Common mistakes
Wrong
<button><i class="icon-trash"></i></button>Right
<button aria-label="Delete"><span class="icon-trash" aria-hidden="true"></span></button>i is not for icons, and an icon-only button needs an accessible name.
Frequently asked questions
Is the i tag deprecated in HTML?
No. HTML5 kept <i> and gave it a semantic definition: text in an alternate voice or mood, such as a foreign phrase, a taxonomic name, a technical term, a ship name or an inner thought. Foreign words also get a lang attribute, as in <i lang="fr">bon appetit</i>. The typographic conventions it follows are covered in Wikipedia's article on italic type (opens in a new tab).
Should I use the i tag for icons?
Better not. Some icon libraries use <i> because it is short, but that misuses the element, and <span> or an inline <svg> make better homes for icons. Whichever you pick, hide a decorative icon with aria-hidden="true" and give an icon-only button a text label, so screen reader users know what it does.