By Arthur Teboul//12 min read/Tutorial

Markdown Italic: Syntax, Rules, and Common Mistakes (2026)

TL;DR: Markdown italic uses *single asterisks* or _single underscores_ around text. Both produce an <em> HTML element. Triple asterisks (***text***) combine italic with bold. The CommonMark specification (version 0.31.2, section 6.3) defines the full parsing rules. Key gotcha: underscores inside words like file_name_here do NOT trigger italic on spec-compliant parsers — use asterisks instead.

Italic is one of the fundamental inline formatting features in Markdown. It signals emphasis, marks titles of works, introduces technical terms, and adds a layer of meaning that plain text cannot carry. The syntax looks simple — wrap text in a single asterisk — but the full picture includes two marker types, precise word boundary rules for underscores, italic combined with bold, and platform-specific behavior worth knowing.

This guide covers every aspect of Markdown italic according to the CommonMark 0.31.2 specification, with platform comparisons for GitHub, GitLab, VS Code, Obsidian, Reddit, and Pandoc. For a broader overview of all inline text formatting, the markdown text formatting guide covers italic, bold, strikethrough, and inline code together. For a quick-reference of all Markdown syntax, see the markdown cheat sheet.

How Do You Make Text Italic in Markdown?

Italic text in Markdown wraps the target words in single asterisks (*), with no spaces between the marker and the text. This produces an <em> element in HTML, which browsers render as italic by default.

*This text is italic.*

Renders as: This text is italic.

The second method uses single underscores (_):

_This text is also italic._

Renders as: This text is also italic.

Both markers produce identical HTML output:

<em>This text is italic.</em>

The CommonMark specification (section 6.3) calls this "emphasis" and defines both * and _ as valid emphasis delimiters. The difference between them only matters at word boundaries, which the next section covers in detail.

The space rule

The markers must touch the text directly. Any space between the marker and the text breaks the italic formatting:

* This will NOT be italic — space after opening marker *
*This WILL be italic — no spaces*

The first example renders as a literal asterisk followed by plain text. The second renders italic. This single rule — no spaces between marker and text — accounts for a large share of broken italic formatting in Markdown documents.

What Is the Difference Between * and _ for Italic in Markdown?

Both *single asterisk* and _single underscore_ produce <em> in HTML. For most text, they are interchangeable. The difference becomes significant inside words.

CommonMark defines the concept of a flanking delimiter run: a delimiter that can open emphasis must be "left-flanking" (no Unicode whitespace or punctuation to its right), and a delimiter that closes emphasis must be "right-flanking" (no Unicode whitespace or punctuation to its left). For underscores, there is an extra rule: the delimiter cannot open if it is preceded by a Unicode alphanumeric character, and it cannot close if it is followed by one.

file*name*here   → file<em>name</em>here  (works — asterisks ignore word boundary)
file_name_here   → file_name_here         (does NOT work — underscore inside word)

The practical consequence is simple: use asterisks whenever you want to italicize part of a compound word, a filename, or any word-fragment. Underscores are safe for italicizing whole words or phrases where there is whitespace on both sides.

SyntaxInputOutput
Asterisks (whole word)*italic*italic
Underscores (whole word)_italic_italic
Asterisks (intra-word)file*name*herefilenamehere
Underscores (intra-word)file_name_herefile_name_here (broken)

This behavior is specified in CommonMark section 6.1 (flanking delimiter runs) and is consistent across all spec-compliant parsers including GitHub, GitLab, and Pandoc. It is the same word-boundary rule that governs bold underscores — described in detail in the markdown bold guide.

How Do You Make Text Bold and Italic at the Same Time?

Combining bold and italic requires three delimiter characters. The most portable method is triple asterisks:

***This is bold and italic***

Renders as: This is bold and italic

HTML output:

<strong><em>This is bold and italic</em></strong>

You can also mix marker types:

**_This is bold and italic_**
*__This is bold and italic__*
__*This is bold and italic*__

All four variations produce the same <strong><em> output in CommonMark-compliant parsers. Triple asterisks are the most common convention because they are compact and universally supported — including on Reddit and other platforms with partial CommonMark compliance.

Platform note: Reddit's Markdown renderer handles *** for bold italic correctly, but **_ and *__ combinations are inconsistent. If you write for Reddit specifically, stick with ***triple asterisks*** for bold italic.

If you only want to add bold to an already-italic run of text, the cleanest pattern is to nest the markers explicitly:

*This sentence is italic and **this phrase** is also bold.*

The key is to close the inner marker before the outer one — just as you would nest HTML tags.

When Should You Use Italic?

Italic carries semantic meaning as an <em> element. Use it purposefully rather than decoratively. The four most common legitimate uses are:

Titles of works. Books, films, albums, and long-form works are conventionally set in italic:

*Moby Dick* is a foundational American novel.
The band released *Dark Side of the Moon* in 1973.

Technical terms on first introduction. Italic signals that a word is being formally defined:

The process is called *debouncing* — delaying a function call until a pause in events.

Foreign words and phrases. Non-English words not yet absorbed into English are conventionally italicized:

The project adopted a *laissez-faire* approach to feature requests.

Light emphasis within a sentence. When you need to stress a word without the heavier visual weight of bold:

You must configure the *output* directory, not the input directory.

For stronger emphasis — warnings, critical steps, must-not-miss information — bold (**) is more appropriate. See the markdown bold guide for a discussion of when to prefer bold over italic.

How Do You Use Italic in Headings, Lists, Tables, and Blockquotes?

Italic is an inline formatting feature, which means it works inside any block element. The parser resolves block structure first, then applies inline formatting rules to the text content.

Italic in headings

## Reading *Moby Dick* as a Developer
 
### The *laissez-faire* Approach to Configuration

Both render correctly. Italic in headings is common when a heading contains a title of a work or a technical term being introduced. Use it with restraint — the heading is already visually prominent, and over-styling can make it harder to scan.

Italic in list items

- *Emphasis*: used sparingly for titles, terms, and foreign words
- Use *asterisks* rather than underscores for intra-word italic
- The file *README.md* must be present in the root directory

Italic works naturally in list items, particularly for highlighting specific terms or filenames within a definition-style list. For complete list formatting options and nested list syntax, see the markdown lists guide.

Italic in tables

| Element | HTML tag | Example |
|---------|----------|---------|
| Italic | `<em>` | *emphasis* |
| Bold | `<strong>` | **strong** |
| Strikethrough | `<del>` | ~~deleted~~ |

Italic inside table cells is valid and renders correctly across GitHub, GitLab, VS Code, Obsidian, and Pandoc. The parser handles inline formatting inside cells the same way it does in paragraphs.

Italic in blockquotes

> *Note:* This behavior is parser-dependent and may vary across platforms.
 
> As Hemingway wrote: *"The first draft of anything is shit."*

Italic inside blockquotes renders as expected. It is especially common for attributing quoted material — book titles, article names, or the source of a quotation. For all blockquote formatting options, see the markdown blockquote guide.

How Does Italic Render as HTML?

Every CommonMark-compliant parser converts Markdown italic to the <em> HTML element. This is important because <em> has semantic meaning beyond its visual appearance — it signals emphasis to browsers, search engines, and screen readers.

*Italic text* in a sentence.

Produces:

<p><em>Italic text</em> in a sentence.</p>

For bold italic:

***Bold italic*** in a sentence.

Produces:

<p><strong><em>Bold italic</em></strong> in a sentence.</p>

The HTML <i> element (purely presentational, no semantic weight) is the older equivalent of <em>. The <em> element replaced <i> in HTML5 as the standard for semantically emphasized text. All Markdown parsers use <em>, not <i>. If you specifically need to produce an <i> tag — for example, to mark technical terms without emphasis semantics — you must write raw HTML directly in your Markdown file.

You can inspect the exact HTML output of any Markdown italic syntax with the free Markdown to HTML converter — paste your text and the tool shows the rendered HTML structure including the precise tag nesting.

Which Platforms Support Markdown Italic?

Italic (*) is supported on every platform that renders Markdown. The differences between platforms are small but meaningful if you write for multiple destinations.

Platform*italic*_italic_***bold italic***Intra-word *
GitHub (GFM)YesYesYesYes
GitLab (GLFM)YesYesYesYes
VS Code previewYesYesYesYes
ObsidianYesYesYesYes
RedditYesPartialYesNo
PandocYesYesYesYes
CommonMark strictYesYes (word boundary rule)YesYes

Reddit deserves special attention. Reddit's parser handles *italic* reliably but sometimes treats _underscores_ as literal characters depending on surrounding context. For Reddit, always use *single asterisks* for italic.

Obsidian applies its own rendering pipeline but follows CommonMark rules for italic. Italic inside wiki links ([[page|*italic*]]) may not render in all Obsidian themes — italicize the surrounding text instead of the link label.

Pandoc preserves italic across output formats: *italic* translates to \emph{} in LaTeX, <w:i/> in DOCX, and <em> in HTML. Italic is one of the most reliably converted formatting features when using Pandoc for document transformation.

GitHub Flavored Markdown (GFM) extends CommonMark and handles italic consistently. One edge case: in GitHub issue comments and PR descriptions, _single underscores_ inside technical identifiers (like some_variable_name) do not trigger italic because the word boundary rule blocks it — this is correct CommonMark behavior, not a GitHub bug.

What Are the Most Common Markdown Italic Mistakes?

Five mistakes account for nearly all broken italic formatting. Each fails silently — no error, just literal asterisks or underscores in the output.

Mistake 1: Space between marker and text

* This will NOT be italic — space after opening marker *
*This WILL be italic — no spaces*

The opening delimiter must be left-flanking: no whitespace to its right. The closing delimiter must be right-flanking: no whitespace to its left. Any space breaks the emphasis.

Mistake 2: Underscores inside compound words or identifiers

file_name_here    → renders as: file_name_here  (broken)
file*name*here    → renders as: file with italic "name" (works)

This mistake is particularly common in technical writing where variable names, filenames, and identifiers contain underscores. Always switch to asterisks for any intra-word italic. For the same reason, bold underscores inside words also fail — the word boundary rule is documented in CommonMark section 6.1. See the markdown strikethrough guide for how similar rules apply to strikethrough markers.

Mistake 3: Unclosed delimiter

*This italic text is never closed
 
The next paragraph is plain text.

An unclosed * renders as a literal asterisk. The parser does not auto-close emphasis across paragraph breaks. Always close your italic marker in the same paragraph — ideally on the same line.

Mistake 4: Using backticks instead of asterisks

`This is inline code, not italic`
*This is italic*

Backticks produce inline code (<code>), not italic (<em>). The visual result in some monospace fonts can look similar enough to cause confusion when writing quickly. Backticks are the right choice for code, filenames, and commands; asterisks are the right choice for italic.

Mistake 5: Nesting markers in the wrong order

*italic **and bold* still bold?**   → broken nesting
*italic **and bold** still italic*  → correct: close inner first

Nested emphasis markers must close in reverse order (innermost first), following the same rule as HTML tags. Incorrect nesting produces unpredictable output across parsers — some attempt to recover, others render literal markers.

What Is the Difference Between Italic in Markdown and HTML?

Markdown italic (*text*) and HTML italic (<em>text</em>) produce the same rendered output in a browser, but differ in how they are written and where they work. In a Markdown file, both are valid:

This sentence uses *Markdown italic* and <em>HTML italic</em>.

Most Markdown parsers allow inline HTML, so <em> tags work inside .md files as long as the parser has HTML passthrough enabled. Raw HTML gives access to attributes Markdown cannot express, such as class or lang on the <em> element. The downside is portability — strict CommonMark implementations without HTML extensions strip raw HTML tags, leaving the text unstyled. The * syntax is always the safer and more portable choice.

How Do You Preview Markdown Italic on macOS?

macOS displays .md files as plain text in Quick Look by default. Without a dedicated Markdown viewer, you cannot verify that your italic syntax rendered correctly.

MacMD Viewer — A native macOS app that renders Markdown files instantly as you edit them in any text editor. It supports the full CommonMark 0.31.2 spec, including all italic, bold, bold italic, and intra-word emphasis rules. Italic text renders as <em> using a GFM-compatible renderer, with output identical to GitHub's. Double-clicking any .md file opens a live preview with correct formatting. Download MacMD Viewer ($19.99, one-time purchase).

VS Code — Open a Markdown file and press Cmd+Shift+V to toggle the built-in preview. Italic renders correctly and the preview updates live as you type.

MacMD Viewer's QuickLook extension also adds a Markdown preview directly in Finder's Quick Look (Space key), so you can check italic and other formatting without opening any app at all.

Frequently Asked Questions

How do you make text italic in Markdown?

Wrap the text in single asterisks: *italic text*. No spaces between the marker and the text. This produces <em>italic text</em> in HTML and renders as italic on GitHub, GitLab, VS Code, Obsidian, Reddit, Pandoc, and every other CommonMark-compatible platform.

What is the keyboard shortcut for italic in Markdown?

Markdown itself has no keyboard shortcuts — it is plain text. However, many Markdown editors implement Cmd+I (macOS) or Ctrl+I (Windows/Linux) to wrap the selected text in *single asterisks* automatically. VS Code, Obsidian, Typora, and most dedicated Markdown editors support this shortcut.

Can you nest italic inside bold, or bold inside italic?

Yes. **This is bold and *this part is also italic*** produces bold text with an italic section inside. The key is to close the inner marker before the outer one. Triple asterisks (***bold italic***) are the simplest way to combine both, and they are supported on every platform. See the markdown bold guide for more detail on the nesting rules.

Does Markdown italic work inside code blocks?

No. Text inside a fenced code block (triple backticks) or inline code (single backticks) is treated as literal characters. *italic* inside a code block renders as *italic* — the asterisks are not interpreted as formatting markers. This is by design — code blocks preserve exact source text.

Why do my underscores not make text italic?

The most likely cause is that the underscores are adjacent to alphanumeric characters (intra-word position). CommonMark requires unicode word boundaries around underscore emphasis delimiters. For example, file_name_here does not italicize "name" because there is no whitespace before the opening _ or after the closing _. Switch to file*name*here — asterisks do not have this word-boundary restriction.

Ready to read Markdown beautifully?

Native macOS viewer with Mermaid diagrams, syntax highlighting, and QuickLook. One-time purchase, no subscription.

Buy for $19.99

Continue reading with AI

Summarize in ChatGPT🔍Research in PerplexityAsk Google AI

Content licensed under CC BY 4.0. Cite with attribution to MacMD Viewer.

Related Articles

Tutorial

Markdown Code Block: Complete Syntax Guide (2026)

Markdown code blocks use triple backticks (```) or 4-space indentation (CommonMark 0.31.2). Add a language tag for syntax highlighting. Full inline and fenced block syntax with examples.

Tutorial

Markdown Bold: Syntax, Rules, and Common Mistakes (2026)

Markdown bold uses **double asterisks** or __double underscores__ around text (CommonMark 0.31.2). Full syntax guide covering bold italic, tables, headings, and cross-platform differences.

Tutorial

Markdown Ordered List: Complete Syntax Guide (CommonMark 0.31.2)

Markdown ordered lists use numbers followed by a period (1. 2. 3.) to create <ol> HTML. Only the first number matters — CommonMark auto-increments the rest. Full syntax, nesting, and platform guide.