How to Make Text Italic in HTML (i vs em vs CSS)

By Marko Denic
Contents
  1. The HTML tags
  2. em: emphasis
  3. i: alternate voice
  4. Other tags that render in italics
  5. The CSS way
  6. font-style: italic
  7. Remove italics
  8. Load a real italic font
  9. FAQ

There are two HTML tags that make text italic, <em> and <i>, and one CSS property, font-style: italic. They look the same in the browser but mean different things:

  • <em> for emphasis: words you’d stress when reading aloud.
  • <i> for text in an alternate voice: foreign words, technical terms, ship names, thoughts.
  • font-style: italic when italics are purely visual design, with no meaning.

Demo:

I really need coffee. (em: stressed)

The word déjà vu is French. (i: foreign phrase)

I read Clean Code last year. (cite: title of a work)

A caption styled with CSS. (font-style)

The HTML tags

em: emphasis

<em> changes the meaning of a sentence by stressing a word. Compare “I didn’t say that” with “I didn’t say that”. Emphasis can be nested for stronger stress. For strong importance (rather than stress), use <strong>, which is bold by default.

html
<p>You <em>must</em> save your work before closing the app.</p>

i: alternate voice

<i> no longer means just “italic”. Since HTML5 it marks text that’s set apart from the normal prose without being emphasized: foreign words (add a lang attribute so screen readers pronounce them right), scientific names, technical terms, ship names, a character’s thoughts.

html
<p>The <i lang="la">Homo sapiens</i> species.</p>
<p>We sailed on the <i>Queen Mary</i>.</p>
<p><i>Did I lock the door?</i> she wondered.</p>

Other tags that render in italics

Browsers italicize a few more elements by default. Use them for their meaning, and the italics come for free:

  • <cite>: the title of a creative work (a book, film, article). Common inside a blockquote attribution.
  • <dfn>: the term being defined.
  • <var>: a variable in math or code.
  • <address>: contact information.
html
<p><dfn>Flexbox</dfn> is a one-dimensional layout model.</p>
<p>The area is <var>width</var> × <var>height</var>.</p>

The CSS way

font-style: italic

For italics that are just styling (captions, bylines, a design accent), use CSS, so the HTML stays meaningful. A class is the right tool here; see CSS class selectors.

css
.caption {
  font-style: italic;
}

/* oblique: a slanted version, optionally with an angle */
.slanted {
  font-style: oblique 10deg;
}

Remove italics

Reset any of the italic elements with font-style: normal. Common for <address>, or when a design uses color instead of italics for emphasis.

css
em,
address {
  font-style: normal;
}

em {
  color: #1d4ed8; /* emphasis by color instead */
}

Load a real italic font

If your web font has no italic file, the browser fakes one by slanting the regular letters (“faux italic”), which usually looks worse. Load the italic style too, or use a variable font with an italic axis.

css
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
}

FAQ

What is the HTML tag for italics?

<em> for emphasized words and <i> for text in a different voice, like foreign words or titles of ships. Both are italic by default.

Is the i tag deprecated?

No. It was redefined in HTML5 with a semantic meaning (alternate voice), and it’s valid. It’s just not the tag for emphasis.

Do screen readers read em differently?

Most screen readers don’t change their voice for <em> by default, but the meaning is in the markup for tools that use it. Don’t rely on italics alone to carry important meaning.

How do I make italic text in Markdown?

Wrap it in single asterisks or underscores: *italic* or _italic_. Markdown converts it to <em>.