One asterisk for italic, two for bold, three for both. It is the fastest thing to learn in Markdown and the one with the most edge cases, almost all of them involving underscores.
*italic* and _italic_
**bold** and __bold__
***bold italic***
~~strikethrough~~
A word with an intra**word**emphasis.italic and italic
bold and bold
bold italic
strikethrough
A word with an intrawordemphasis.
The two markers
* and _ mean exactly the same thing. One of each is italic, two is bold, three is both:
*italic*
**bold**
***bold italic***italic bold bold italic
Use asterisks. Not because underscores are wrong, but because of one behaviour that catches everyone: emphasis inside a word works with asterisks and fails with underscores.
intra*word*emphasis works
intra_word_emphasis does notintrawordemphasis works intra_word_emphasis does not
That rule exists for a good reason — snake_case_names would otherwise turn into italics halfway through — but it means the two markers are not interchangeable. Pick * and you never have to think about it.
Strikethrough
Two tildes:
~~This was wrong~~ and this is the correction.This was wrong and this is the correction.
Strikethrough is a GitHub Flavored Markdown extension rather than original Markdown. Every modern editor supports it; a very old parser may not.
Combining and nesting
You can nest one kind of emphasis inside another as long as the markers differ:
**bold with *italic* inside**
*italic with **bold** inside*
**bold with `code` and ~~strike~~ inside**bold with italic inside
italic with bold inside
bold with code and strike inside
Using the same marker for both is where it gets ambiguous — *** is bold italic, not italic inside bold. If you need to be precise, mix the markers: **_bold italic_**.
What emphasis is not
**Section title** on its own line looks like a heading. It is not one: it produces no anchor, no table-of-contents entry and no structure. Screen readers cannot navigate by it. Use ## — see headings.
Likewise, backticks mean “this is code”, not “this is important”. `like this` is for things the reader might type; **like this** is for things they should notice.
Escaping
To show a literal asterisk or underscore, put a backslash in front:
\*not italic\*
5 \* 3 = 15*not italic*
5 * 3 = 15
In practice you rarely need to: an asterisk surrounded by spaces is not treated as emphasis, and neither is an unmatched one. See escaping characters for the full list.
Common mistakes
Spaces inside the markers. ** bold ** does not work. The marker must touch the text: **bold**.
Unmatched markers. An opening ** with no closing one renders as literal asterisks. Long paragraphs are where this hides.
Underscores in code, filenames and URLs. my_variable_name outside of backticks can become italic in some parsers. Wrap identifiers in backticks — it is more correct anyway.
Emphasis across a line break. Emphasis cannot span a paragraph break. It can span a soft line break, but it is fragile; keep the markers on the same line.
Using emphasis for structure. Bold is not a heading, and italics are not a quote. Use the element that means what you want.
FAQ
How do I make text bold in Markdown?
Wrap it in two asterisks: **bold**. Two underscores, __bold__, do the same thing, but asterisks behave more predictably inside words.
What is the difference between asterisks and underscores in Markdown?
For ordinary emphasis, none — both produce the same output. The difference is inside a word: intra*word*emphasis works, intra_word_emphasis does not, because that rule protects snake_case identifiers from being italicised.
How do I write bold and italic at the same time?
Three markers on each side: ***bold italic***. If you want to be explicit about the nesting, mix them: **_bold italic_**.
How do I strike through text in Markdown?
Wrap it in two tildes: ~~struck~~. It is a GitHub Flavored Markdown extension, supported by every modern editor but not by the original 2004 syntax.
Why is my bold text not working in Markdown?
Usually a space between the marker and the text — ** bold ** will not render — or an unmatched marker somewhere earlier in the paragraph. Both leave the asterisks visible as plain characters.