Tag i

The i tag is used to italicize text and is often used to indicate text in an alternate voice or mood, such as:

  • Technical terms
  • Foreign words
  • Thoughts or inner dialogue
  • Icons or screen reader hints

✅ Note: <i> means italic in appearance, but its semantic meaning is context-specific.


✅ Basic Syntax

<p>This is an <i>important</i> word.</p>

📍 Result: The word “important” will appear in italic.


📌 Use Cases

Use caseExample
Emphasizing terms<i>et cetera</i> for Latin phrases
Book titles<i>War and Peace</i>
Technical text<i>function()</i> returns a value
Icon fonts<i class="fa fa-star"></i>

🎨 Styling Tip (CSS Alternative)

Although <i> is used for italics, semantic alternatives like <em> (emphasis) are better for accessibility. You can style any text as italic using CSS:

<span style="font-style: italic;">Custom Italics</span>

⚠️ <i> vs <em>

TagMeaningStylingBest For
<i>Alternate voice/moodItalic textTechnical terms, icons, foreign words
<em>Emphasis (semantic)Italic textEmphasizing words in speech

✅ Summary

Feature<i> Tag
PurposeDisplays italic text
Semantic RoleAlternate tone or voice
Visible EffectItalicizes enclosed text
Alternatives<em> for semantic emphasis