Markdown Bold and Italic to HTML Strong and Em Tags

Convert Markdown bold (**text**) and italic (*text*) emphasis to HTML <strong> and <em> tags. Includes combined emphasis and nesting examples.

Inline Elements

Detailed Explanation

Bold and Italic Emphasis in Markdown

Markdown uses asterisks (*) and underscores (_) to indicate emphasis, which converts to HTML <em> (italic) and <strong> (bold) tags.

Italic Text

Wrap text in a single asterisk or underscore for italic emphasis:

*italic with asterisks*
_italic with underscores_

Converts to:

<em>italic with asterisks</em>
<em>italic with underscores</em>

Bold Text

Wrap text in double asterisks or underscores for bold emphasis:

**bold with asterisks**
__bold with underscores__

Converts to:

<strong>bold with asterisks</strong>
<strong>bold with underscores</strong>

Combined Bold and Italic

Use triple asterisks or underscores for text that is both bold and italic:

***bold and italic***
___bold and italic___

Converts to:

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

Nesting Emphasis

You can nest bold inside italic or vice versa:

*This is italic and **this is bold** inside it*

Produces:

<em>This is italic and <strong>this is bold</strong> inside it</em>

Asterisks vs. Underscores

While both work, asterisks are preferred in most style guides because underscores can cause issues mid-word. For example, un_frigging_believable may not render as expected with some parsers, while un*frigging*believable works consistently.

Use Case

Emphasis is used everywhere — from highlighting key terms in documentation to formatting important warnings in README files. Understanding the HTML output helps when styling converted content with CSS or when debugging rendering issues.

Try It — Markdown to HTML Converter

Open full tool