Back to blog
·

Markdown Emphasis Syntax: Bold, Italic, and More

Learn markdown emphasis syntax for bold, italic, and nested formatting, plus escaping tips and parser differences. Boost clarity in your docs.

Introduction

Markdown emphasis syntax is the inline formatting used to make text italic, bold, or both in plain text. It is part of Markdown, a lightweight writing format used in documentation, developer docs, and other content formatting workflows.

Emphasis helps readers scan text more quickly by highlighting key terms, warnings, and distinctions. In practice, it is one of the most common forms of inline formatting in Markdown, along with links and code spans.

This guide explains what emphasis is, how to italicize and bold text in Markdown, when to use asterisks or underscores, how to escape literal characters, and why rendering can differ across Markdown parsers. It also covers CommonMark, GitHub Flavored Markdown, nested formatting, and best practices for plain text writing.

If you want a broader foundation first, see Markdown basics and plain text formatting.

What Markdown Emphasis Syntax Means

Markdown emphasis syntax is the set of markers that tell a Markdown parser to render text with emphasis or strong emphasis. In most Markdown implementations, single markers create italic text, and double markers create bold text. That makes emphasis a semantic choice, not just a visual one: it signals importance, contrast, or subtle stress in the content.

Unlike headings or lists, emphasis works inside a sentence as inline formatting. Markdown parsers interpret the source text according to rules that can vary slightly between CommonMark, GitHub Flavored Markdown, and other implementations. For documentation and developer docs, that means you should choose syntax that is both readable in plain text and reliable in your target renderer.

For a broader reference, see the complete Markdown guide and Markdown for developer docs.

How to Italicize Text in Markdown

To italicize text in Markdown, wrap the text in single asterisks or single underscores:

  • *italic text*italic text
  • _italic text_italic text

Use italic text for light emphasis, titles, foreign terms, or subtle editorial stress. For example: OpenAPI specification, use caution, or plain text.

How to Bold Text in Markdown

To make text bold in Markdown, wrap it in double asterisks or double underscores:

  • **bold text**bold text
  • __bold text__bold text

Use bold text for warnings, key terms, or strong emphasis. For example: do not delete this file or API key.

What Is the Difference Between Bold and Italic in Markdown?

Italic text adds subtle emphasis. Bold text adds stronger emphasis and draws more attention. In content formatting, italic is usually better for gentle stress or stylistic distinction, while bold is better for instructions, alerts, and terms that must stand out.

In Markdown, the difference is created by the number of markers: one marker on each side for italic, two markers on each side for bold.

How to Make Text Bold and Italic in Markdown

You can combine emphasis styles in a few ways, depending on the Markdown parser:

  • ***bold italic***bold italic
  • **_bold italic_**bold italic
  • *_bold italic_*bold italic

This is called nested formatting. It is useful when you want a phrase to be both strongly emphasized and visually distinct. Some Markdown parsers handle nested formatting more consistently than others, so test the output in your target environment.

Should You Use Asterisks or Underscores for Emphasis?

Markdown supports both asterisks and underscores for emphasis, so *text* and _text_ usually render the same, as do **text** and __text__. In most prose, asterisks are the safer default because underscores can be misread inside identifiers, filenames, and other plain text such as variable_names, user_id, or app_config.yaml.

That said, either marker is valid in many cases. The best choice is the one that keeps your source readable and avoids accidental formatting in your Markdown parser.

For examples and syntax reminders, see the Markdown cheat sheet and Markdown style guide examples.

Why Is My Markdown Emphasis Not Rendering?

If emphasis is not rendering, the most common causes are:

  • Missing closing markers: *italic or **bold
  • Extra spaces between the markers and the text: * text *
  • Unescaped literal characters that the parser interprets as formatting
  • Unsupported nesting rules in the current Markdown parser
  • Underscores inside words or identifiers that confuse the renderer

For example, variable_name may stay literal in one renderer, while another parser may treat nearby underscores as formatting markers if the surrounding text is ambiguous. When in doubt, test the exact text in GitHub, a CMS, or your documentation tool.

How to Escape Asterisks and Underscores in Markdown

If you need literal asterisks or underscores in plain text, use a backslash escape:

  • \*asterisk\*
  • \_underscore\_

This tells the Markdown parser to treat the characters as text instead of emphasis markers. If you are writing code, use backticks instead of emphasis:

  • variable_names
  • config.json
  • Markdown parsers

Does Markdown Emphasis Work the Same in GitHub Flavored Markdown and CommonMark?

CommonMark and GitHub Flavored Markdown handle most emphasis syntax the same way, but edge cases can differ. The biggest differences usually show up with nested formatting, intraword underscores, and punctuation-adjacent markers.

For example, a phrase that renders correctly in one Markdown parser may behave differently in another if the markers are not balanced or if underscores appear inside identifiers. GitHub uses GitHub Flavored Markdown, which is based on CommonMark but adds some platform-specific behavior. If your content will appear on GitHub, test it there directly.

Can You Use Emphasis Inside Links or Code Blocks?

Yes, emphasis can appear inside link text, such as read the docs. That can be useful when you want part of the link label to stand out.

Code blocks and inline code are different: they should preserve literal text, so emphasis markers inside backticks are not rendered as formatting. For example, *not italic* stays plain inside inline code.

Best Practices for Using Emphasis in Markdown

Use emphasis intentionally and sparingly. Good Markdown emphasis supports readability without making the page noisy.

Best practices:

  • Use italic text for subtle emphasis, titles, and foreign terms.
  • Use bold text for warnings, key actions, and important terms.
  • Prefer a consistent marker style across a document or style guide.
  • Use asterisks by default unless your team prefers underscores.
  • Avoid emphasizing every other word, especially in dense documentation.
  • Test tricky cases in the target Markdown parser before publishing.
  • Use headings, lists, and other structure for organization instead of relying on emphasis alone.

For more guidance, see the content formatting guide for Markdown and Markdown style guide examples.

Conclusion

Markdown emphasis syntax is simple once you understand the markers: single markers for italic text, double markers for bold text, and combined markers for bold-italic or nested formatting. The main challenge is not the syntax itself, but how different Markdown parsers handle edge cases.

To keep your content reliable, choose a consistent style, escape literal characters when needed, and verify the final render in your target environment. That approach works well in GitHub, documentation systems, and other plain text workflows.

For a broader reference, see the Markdown guide and the complete Markdown guide.