The HTML <i>
element represents a range of text that is set off from the normal text for some reason. Some examples include technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Content categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts phrasing content. |
Permitted ARIA roles | Any |
DOM interface | HTMLElement |
Attributes
This element only includes the global attributes.
Usage notes
- Use the
<i>
element for text that is set off from the normal prose for readability reasons. This would be a range of text with different semantic meaning than the surrounding text. - In earlier versions of the HTML specification, the
<i>
element was merely a presentational element used to display text in italics, much like the<b>
element was used to display text in bold letters. This is no longer true, as these tags now define semantics rather than typographic appearance. A browser will typically still display the contents of the<i>
element in italic type, but is, by definition, no longer required to. - Typically this element is displayed in italic type. However, it should not be used simply to apply italic styling; use the CSS
font-style
property for that purpose. - Be sure the text in question is not actually more appropriate for another element.
- It is a good idea to use the class attribute to identify why the element is being used, so that if the presentation needs to change at a later date, it can be done selectively with style sheets.
Example
This example demonstrates using the <i>
element to mark text that is in another language.
<p>The Latin phrase <i class="latin">Veni, vidi, vici</i> is often mentioned in music, art, and literature.</p>
Result
The Latin phrase Veni, vidi, vici is often mentioned in music, art, and literature.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<i>' in that specification. |
Living Standard | |
HTML5 The definition of '<i>' in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of '<b>' in that specification. |
Recommendation |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
i | Chrome Full support 1 | Edge Full support Yes | Firefox Full support 1 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support