**bold text**
*italic text*
***bold and italic***Text emphasis is an indispensable element of typography. In long-form documentation, technical guides, meeting minutes, and personal notes, bold and italic formatting directs reader attention, highlights critical terms, denotes book and article titles, and conveys conversational inflection.
Markdown provides intuitive markup for both italic (emphasis) and bold (strong emphasis) using asterisks (*) or underscores (_). While deceptively simple on the surface, understanding the formal CommonMark parsing rules prevents formatting errors and broken text rendering.
Italic syntax (Emphasis)
To italicize text in Markdown, wrap the target word or phrase with a single asterisk (*) or a single underscore (_):
*This text is rendered in italics using asterisks.*
_This text is also rendered in italics using underscores._
Both syntaxes compile to the HTML <em> (emphasis) element.
Best practice: Prefer asterisks over underscores
CommonMark treats intraword underscores differently from intraword asterisks:
- Writing
snake_case_variablewill not trigger italics in CommonMark because underscores flanked by alphanumeric characters are ignored. - However, across non-CommonMark legacy parsers, underscores inside filenames or code identifiers frequently trigger broken italics.
- Writing
*italic*using asterisks is unambiguous and portable across all tools.
Bold syntax (Strong emphasis)
To render text in bold, enclose the target words with two asterisks (**) or two underscores (__):
**This text is rendered in bold using double asterisks.**
__This text is also rendered in bold using double underscores.__
Both syntaxes compile to the HTML <strong> element.
Bold text within sentences
You can emphasize specific words without breaking sentence flow:
Ensure you run **database migrations** before deploying the application.
Combined bold and italic (Strong + Emphasis)
When you need intense emphasis—such as urgent warnings, core architectural caveats, or critical deadlines—you can combine bold and italic styling:
***This sentence is both bold and italic using triple asterisks.***
___This sentence is both bold and italic using triple underscores.___
**_You can also nest an underscore inside double asterisks._**
All three variations compile to nested HTML elements: <strong><em>bold and italic</em></strong>.
Parsing rules and delimiter boundaries
The CommonMark specification eliminated decades of ambiguous edge cases by establishing formal rules for delimiter runs:
- Left-flanking delimiters: An opening delimiter must not be followed by whitespace, and must not be preceded by alphanumeric text unless punctuation intervenes.
- Right-flanking delimiters: A closing delimiter must not be preceded by whitespace, and must not be followed by alphanumeric text.
- Symmetry matters: If you open emphasis with asterisks, you must close it with the matching number of asterisks. Writing
**text*will not produce bold text; it leaves raw syntax visible.
Common syntax mistakes
<!-- INCORRECT: Whitespace inside delimiters -->
** this text will not bold **
<!-- CORRECT: Delimiters touch the text directly -->
**this text bolds properly**
Strikethrough comparison (GFM extension)
While CommonMark defines bold and italics, it does not specify strikethrough. GitHub Flavored Markdown (GFM) and Oyma extend basic emphasis with double tildes:
~~This text has a strikethrough line drawn across it.~~
You can combine strikethrough with bold and italics:
**~~Bold and struck through~~**
Formatting text in Oyma on macOS
Writing in Oyma eliminates the friction of manual markdown typing:
- Select any word and press
⌘Bfor instant bold (**text**). - Select any word and press
⌘Ifor instant italics (*text*). - In live-preview mode, Oyma renders text with native macOS SF/Inter typography while concealing the bounding markdown delimiters. When you place your cursor inside the word to edit, the asterisks reappear instantly for precise cursor positioning.
- Raw files on your disk remain standard, clean CommonMark Markdown.
Frequently asked questions
- Should I use asterisks (*) or underscores (_) for bold and italics?
- Asterisks are recommended for emphasis. While CommonMark supports both, underscores inside words (such as `user_profile_name`) can trigger accidental italicization unless properly escaped. Asterisks avoid intraword parsing ambiguities.
- How do I format text that is simultaneously bold and italic?
- Wrap your target text with three asterisks (`***bold and italic***`) or three underscores (`___bold and italic___`). You can also nest delimiters: `**_bold and italic_**`.
- Can I emphasize punctuation marks in Markdown?
- Yes. Punctuation inside the opening and closing delimiters is emphasized alongside the text (`**Important!**`). CommonMark requires that delimiter runs touch non-whitespace characters on the inner boundary.
- How does Oyma display bold and italics in the live editor?
- Oyma immediately applies bold font weight or italic styling to selected text while hiding the bounding asterisks when your cursor navigates away.
Experience Bold & Italic Emphasis with zero lock-in.
Write CommonMark notes directly on your Mac with native live preview and sovereign local storage.