The syntax
- Bold — `**bold**` or `__bold__`
- Italic — `*italic*` or `_italic_`
- Bold italic — `***both***`
- Strikethrough (GFM) — `~~struck~~`
Asterisks or underscores?
Both work, but asterisks are safer. Underscores are only treated as emphasis at word boundaries in many parsers, so `snake_case_word` stays literal, while `*` never appears in ordinary words. When in doubt, use asterisks.
Escaping and literal characters
To show a literal asterisk, escape it: `\*`. To bold text that itself contains asterisks, wrap it in underscores instead, or escape the inner ones. Mismatched markers — a `**` opened and a single `*` closed — are the commonest reason bold text fails to render.
Emphasis inside other elements
Bold and italic work inside headings, list items, table cells and blockquotes. They do not work inside code spans or fenced code blocks, where everything is literal — that is by design, so code keeps its asterisks.