Definition
The <i> tag is used to define some text in an alternative voice or mood without emphasizing it. The text usually displays in italic.
Example
<p><i>I wonder whether this will be italic</i> thought The Webmaster.</p>I wonder whether this will be italic thought The Webmaster.
Usage
- An opening and closing tag are required.
- Examples of usage include:
- Taxonomic designation
- Technical terms
- Idiomatic phrases in other languages. In these cases it is recommended to add the
langattribute to denote the language. For example:<p>Del Boy used to say <i lang="Fr">je suis un pois<i> every time he met a French person</p> - Transliteration
- A thought
- A ship name in Western texts.
Attributes
The <i> element only supports the Global Attributes.
Best Practices
- You should consider whether other elements might be more appropriate. For example, you can use the
<em>tag to stress emphasis while still making the text italic. Alternatively, for definitions you could use the<dfn>tag, or to mark as important you can use the<strong>tag. - The
<i>element is an inline element. You should use it to mark up parts of a text rather than entire blocks. If you wish to italicize a leading paragraph, for example, then you should use CSS.
Specification
Browser Support
Desktop
| Chrome | Edge | Firefox | IE | Opera | Safari |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
| Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
