Peter Mekhaeil

The Idiomatic Text element

The HTML i element is named the Idiomatic Text element on MDN Web Docs.

The HTML specifications defines the i element as:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.

Historically, the i element was used for presentation and browsers display it in italics. However, even though some browsers continue to display it in italics as a fallback, the i element should not be used for presentational purposes as it does not necessarily mean the text will be in italics.

The i element has semantic meaning and the usage depends on the situation and the surrounding text. MDN Web Docs has a great example:

An example for <i> could be: "The Queen Mary sailed last night". Here, there is no added emphasis or importance on the word "Queen Mary". It is merely indicated that the object in question is not a queen named Mary, but a ship named Queen Mary.