Markdown Bold: Syntax, Rules, and Common Mistakes (2026)
TL;DR: Markdown bold uses
**double asterisks**or__double underscores__around text. Both produce a<strong>HTML element. Triple asterisks (***text***) combine bold with italic. The CommonMark specification (version 0.31.2, section 6.4) defines the full parsing rules. Key gotcha: underscores inside words likeun__der__scoredo NOT trigger bold on most parsers — use asterisks instead.
Bold is one of the most frequently used inline formatting features in Markdown. It draws the reader's eye, signals importance, and structures content visually. The syntax looks simple — wrap text in double asterisks — but the full picture includes two different marker types, edge cases around underscores, bold combined with italic, bold in different block contexts, and meaningful differences between platforms.
This guide covers every aspect of Markdown bold according to the CommonMark 0.31.2 specification, with platform-specific behavior for GitHub, GitLab, VS Code, Obsidian, Reddit, and Pandoc. If you want to understand all inline text formatting together, the markdown text formatting guide covers bold, italic, strikethrough, and inline code in one place. For a quick-reference overview of all Markdown syntax, the markdown cheat sheet is a useful companion.
How Do You Make Text Bold in Markdown?
Bold text in Markdown wraps the target words in double asterisks (**), with no spaces between the markers and the text. This produces a <strong> HTML element, which browsers render as bold by default.
**This text is bold.**Renders as: This text is bold.
The second method uses double underscores (__):
__This text is also bold.__Renders as: This text is also bold.
Both markers produce identical HTML output:
<strong>This text is bold.</strong>The CommonMark specification (section 6.4) calls this "strong emphasis" and defines both ** and __ as valid strong emphasis delimiters. The difference between them only matters at word boundaries, which is covered in detail below.
The space rule
The markers must touch the text directly. Any space between the marker and the text breaks the bold formatting:
** This will NOT be bold — space after opening marker **
**This WILL be bold — no spaces**The first example renders as literal asterisks and plain text. The second renders bold. This is the single most common cause of broken bold formatting in Markdown documents.
What Is the Difference Between * and ** in Markdown?
Single versus double markers control whether the output is italic or bold — one of the most important distinctions in Markdown inline formatting.
*Single asterisks produce italic (emphasis)*
**Double asterisks produce bold (strong emphasis)**
***Triple asterisks produce bold italic***In HTML terms:
<em>Single asterisks produce italic (emphasis)</em>
<strong>Double asterisks produce bold (strong emphasis)</strong>
<strong><em>Triple asterisks produce bold italic</em></strong>The CommonMark specification defines these in sections 6.3 (emphasis) and 6.4 (strong emphasis). The number of delimiters determines the nesting depth: one delimiter run produces <em>, two produces <strong>, three produces both.
Semantic note:
<strong>and<em>carry meaning beyond visual styling. Screen readers may read<strong>text with a different intonation, and search engines may weight<strong>content more heavily than surrounding text. Use bold for genuinely important words, not just for visual decoration.
How Do Double Underscores Differ from Double Asterisks?
For most text, **bold** and __bold__ are interchangeable. Both produce <strong>. The critical difference is how each marker behaves inside a word.
CommonMark requires that a strong emphasis delimiter run be able to open and close based on surrounding punctuation and whitespace. The underscore variant has an additional rule: it cannot open strong emphasis if it is preceded by a Unicode alphanumeric character, and it cannot close if it is followed by one.
un**der**score → un<strong>der</strong>score (works — asterisks)
un__der__score → un__der__score (does NOT work — underscores inside word)The practical consequence: use asterisks whenever you want to bold part of a compound word or a word fragment. Underscores are safe for bolding whole words or phrases where there are spaces on both sides.
| Syntax | Input | Output |
|---|---|---|
| Asterisks (whole word) | **bold** | bold |
| Underscores (whole word) | __bold__ | bold |
| Asterisks (intra-word) | un**der**score | underscore |
| Underscores (intra-word) | un__der__score | un__der__score (broken) |
This behavior is defined in CommonMark spec section 6.1 (flanking delimiter runs) and is consistent across all spec-compliant parsers including GitHub, GitLab, and Pandoc.
How Do You Make Text Bold and Italic at the Same Time?
Combining bold and italic in Markdown 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 the two 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 supported everywhere — including Reddit and older parsers that have 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.
How Do You Use Bold in Headings, Lists, and Tables?
Bold is an inline formatting feature, which means it works inside any block element — headings, list items, table cells, blockquotes, and paragraphs. The parser applies inline formatting rules after it resolves the block structure.
Bold in headings
## **Critical:** Read Before Continuing
### Installation **Required** Before UseBoth work correctly. Bold inside headings is common in documentation to highlight a key term within a longer heading. Be careful not to overuse it — a heading is already visually distinct, and bold inside it can feel redundant.
Bold in list items
- **Performance:** Renders 1,000-line files under 50ms
- **Compatibility:** Follows CommonMark 0.31.2 spec
- Supports **syntax highlighting** for 100+ languagesBold can mark the label in a definition-style list item (the first pattern above) or highlight a specific term within the item text (the third pattern). Both are common in README files and technical documentation. For more on list formatting, see the markdown lists guide.
Bold in tables
| Feature | **Status** |
|---------|-----------|
| Bold text | **Supported** |
| Tables | **Supported** |
| Nested bold | **Supported** |Bold inside table cells is valid and renders correctly on GitHub, GitLab, VS Code, and Obsidian. The parser handles inline formatting inside cells normally. For the full table syntax reference, see the markdown table guide.
Bold in blockquotes
> **Important:** Always validate your inputs before processing.Bold inside blockquotes renders as expected. This pattern is common in documentation to call out warnings or key facts within a quoted block. The markdown blockquote guide covers all blockquote formatting options.
How Does Bold Render as HTML?
Every CommonMark-compliant parser converts Markdown bold to the <strong> HTML element. This is important to understand because <strong> has semantic weight beyond its visual appearance — it signals strong importance to both browsers and accessibility tools.
**Bold text** in a sentence.Produces:
<p><strong>Bold text</strong> 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 <b> element (purely visual, no semantic weight) is the older equivalent. <strong> replaced <b> in HTML5 as the standard for semantically important bold text. All Markdown parsers use <strong>, not <b>. If you need to produce <b> specifically, you must write raw HTML in your Markdown file.
You can inspect the exact HTML output of any Markdown bold syntax with the free Markdown to HTML converter — paste your text and the tool shows the rendered HTML structure.
Which Platforms Support Markdown Bold?
Bold (**) is supported on every platform that renders Markdown. The differences between platforms are small but worth knowing if you write for multiple destinations.
| Platform | **bold** | __bold__ | ***bold italic*** | Intra-word ** |
|---|---|---|---|---|
| GitHub (GFM) | Yes | Yes | Yes | Yes |
| GitLab (GLFM) | Yes | Yes | Yes | Yes |
| VS Code preview | Yes | Yes | Yes | Yes |
| Obsidian | Yes | Yes | Yes | Yes |
| Yes | Partial | Yes | No | |
| Pandoc | Yes | Yes | Yes | Yes |
| CommonMark strict | Yes | Yes (word boundary rule) | Yes | Yes |
Reddit deserves special attention. Reddit's Markdown parser has a partial implementation that handles **bold** reliably but sometimes renders __bold__ as literal underscores depending on surrounding text. For Reddit specifically, always use **double asterisks**.
Obsidian applies its own rendering but follows CommonMark rules for bold. Bold inside wiki links ([[page|**bold**]]) may not render in all Obsidian themes — use plain text for link labels and bold the surrounding text instead.
Pandoc supports bold in conversions to PDF, DOCX, LaTeX, and HTML. The ** syntax translates to \textbf{} in LaTeX and <w:b/> in DOCX. If you are using Pandoc for document conversion, bold is one of the most reliably preserved formatting features.
What Are the Most Common Markdown Bold Mistakes?
Five mistakes account for nearly all broken bold formatting. Each one fails silently — no error, just literal asterisks in the output.
Mistake 1: Single asterisk instead of double
*This is italic, not bold*
**This is bold**A single * produces italic (<em>), not bold (<strong>). This mistake is easy to make when typing quickly, and the visual difference in source code is subtle.
Mistake 2: Space between marker and text
** This will NOT be bold **
**This WILL be bold**Spaces immediately after the opening ** or before the closing ** break the emphasis. CommonMark requires the opening delimiter to be left-flanking (no space to the right) and the closing delimiter to be right-flanking (no space to the left).
Mistake 3: Underscores inside a compound word
un__lock__ed → renders as: un__lock__ed (broken on all spec-compliant parsers)
un**lock**ed → renders as: un**lock**ed with bold (works)As explained above, underscore delimiters cannot open or close strong emphasis adjacent to alphanumeric characters. Switch to asterisks for any intra-word bold.
Mistake 4: Unclosed delimiter
**This bold text is never closed
The next paragraph is still normal.An unclosed ** renders as literal asterisks. The parser does not auto-close strong emphasis across paragraphs. Always close your bold markers in the same paragraph (or even the same line).
Mistake 5: Nesting markers incorrectly
**bold _and italic** still italic?_ → broken nesting
**bold _and italic_** → correct: close inner firstNested emphasis markers must be closed in the reverse order they were opened (innermost first). This follows the same rule as HTML tags. Incorrect nesting produces unpredictable output across parsers.
When Should You NOT Use Bold?
Bold is most effective when used sparingly. A page where every other sentence has bold text loses the visual signal entirely — everything looks equally important, so nothing stands out.
Avoid using bold for:
- Decorative purposes — if the text is not genuinely important, leave it unstyled
- Every technical term on first use — this is a common documentation anti-pattern; use bold only for the most critical terms
- Entire sentences or paragraphs — bold works on words and short phrases; use headings to structure long sections
- Navigation or UI labels in prose — use backtick inline code (
`File > Save`) instead of bold for menu paths and button names
A good rule of thumb: if you cannot explain why a specific word is more important than the surrounding text, it probably should not be bold. The markdown text formatting guide covers this tradeoff in more detail alongside italic and strikethrough usage patterns.
What Is the Difference Between Bold in Markdown and HTML?
Markdown bold (**text**) and HTML bold (<strong>text</strong>) produce the same rendered output in a browser, but they differ in how they are written and where they work.
In a Markdown file, you can freely mix both styles:
This sentence uses **Markdown bold** and <strong>HTML bold</strong>.Both render as bold. Most Markdown parsers allow inline HTML, so <strong> tags work inside .md files as long as the parser has HTML passthrough enabled. Raw HTML gives you access to attributes that Markdown cannot express, such as class or id on the <strong> element:
<strong class="warning">This is a warning.</strong>The downside of raw HTML in Markdown is portability — some parsers (particularly strict CommonMark implementations without HTML extensions) strip raw HTML tags, leaving the text unstyled. The ** syntax is always the safer choice for bold in Markdown documents.
How Do You Preview Markdown Bold on macOS?
macOS displays .md files as plain text in Quick Look by default. You cannot verify that your bold syntax rendered correctly without a dedicated Markdown viewer.
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 bold, italic, bold italic, and intra-word emphasis rules. Bold text renders as <strong> using a GFM-compatible renderer identical to GitHub's output. 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. Bold 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 bold and other formatting without opening any app at all.
Frequently Asked Questions
How do you make text bold in Markdown?
Wrap the text in double asterisks: **bold text**. No spaces between the markers and the text. This produces <strong>bold text</strong> in HTML and renders as bold on GitHub, GitLab, VS Code, Obsidian, Reddit, Pandoc, and every other CommonMark-compatible platform.
What is the keyboard shortcut for bold in Markdown?
Markdown itself has no keyboard shortcuts — it is plain text. However, many Markdown editors implement Cmd+B (macOS) or Ctrl+B (Windows/Linux) to wrap the selected text in **double asterisks** automatically. VS Code, Obsidian, Typora, and most dedicated Markdown editors support this shortcut.
Can you nest bold inside italic, or italic inside bold?
Yes. *This is italic and **this part is also bold*** produces italic text with a bold 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.
Does Markdown bold work inside code blocks?
No. Text inside a fenced code block (triple backticks) or inline code (single backticks) is treated as literal characters. **bold** inside a code block renders as **bold** — the asterisks are not interpreted as formatting markers. This is by design — code blocks preserve exact text.
Why do my underscores not make text bold?
The most likely cause is that the underscores are adjacent to alphanumeric characters (intra-word position). CommonMark requires word boundaries around underscore delimiters. For example, un__lock__ed does not bold because there is no space before the opening __ or after the closing __. Switch to un**lock**ed — asterisks do not have this word-boundary restriction.
Continue reading with AI
Content licensed under CC BY 4.0. Cite with attribution to MacMD Viewer.