HTML <i>
Tag
Concept
The <i>
tag is used to italicize text, making it distinct from the surrounding content. While it’s often used for stylistic purposes, it’s important to note that this tag doesn’t add semantic meaning to the text. For text that should be emphasized semantically, the <em>
tag is more appropriate.
Implementation
Example 1: Stylistic Italicization
<p>This is a <i>italicized</i> word in a sentence.</p>
Example 2: Italicizing a Phrase
<p>The phrase <i>"Carpe Diem"</i> means "Seize the Day."</p>
Try it out below:
powered by Advanced iFrame. Get the Pro version on CodeCanyon.
Attributes Table
Global Attributes
The <i>
tag supports all global attributes in HTML.
Event Attributes
The <i>
tag also supports all event attributes in HTML.
Browser Support Table
Browser | Support |
---|---|
Chrome | Yes |
Firefox | Yes |
Safari | Yes |
Opera | Yes |
IE | Yes |
Default CSS Settings
i {
font-style: italic;
}
Conclusion
The <i>
tag is a straightforward way to italicize text for stylistic reasons. However, it’s crucial to remember that it doesn’t add semantic emphasis to the text.
For that purpose, the <em>
tag is more suitable. The <i>
tag is widely supported across all browsers and is a staple in HTML for text styling.