MDUtil

Highlighting Text in Markdown

Standard Markdown has no highlight syntax. The HTML <mark> tag works wherever HTML is allowed, and some editors read ==text==. This guide shows both and where each one works.

Quick answer

How do you highlight text in Markdown?

Wrap the text in the HTML <mark> tag: <mark>highlighted</mark>. It shows a yellow background on GitHub and in most apps that allow HTML. Obsidian and Typora also read ==highlighted==, an extension that other renderers show as typed.

Markdown
Remember to <mark>back up your files</mark> first.

Result

Remember to back up your files first.

Highlight syntax and examples

The <mark> tag works almost anywhere HTML does. The == syntax depends on the app.

With other formatting

Markdown inside <mark> still works, and the tag can sit inside bold or italic text.

Markdown
<mark>**Deadline:** Friday</mark>

**Bold with a <mark>highlighted</mark> word**

Result

Deadline: Friday

Bold with a highlighted word

In lists and tables

The tag works in list items and table cells too.

Markdown
- [ ] <mark>Renew the certificate</mark>
- [x] Update the docs

| Plan | Price |
| --- | --- |
| Pro | <mark>€79</mark> |

Result

  • Renew the certificate
  • Update the docs
PlanPrice
Pro€79

Several highlights in a paragraph

Each <mark> covers only the text between its tags, so one paragraph can hold several.

Markdown
Bring <mark>a passport</mark>, <mark>the booking number</mark> and a pen.

Result

Bring a passport, the booking number and a pen.

Double equals signs

Obsidian reads ==text== as a highlight; Typora does once the option is turned on. Other renderers show the equals signs.

Markdown
Remember to ==back up your files== first.

Obsidian and Typora only. Other Markdown apps display this differently, so there is no preview.

Where highlighting is not available

In apps that remove HTML, bold text is the usual way to make words stand out.

Markdown
Remember to **back up your files** first.

Result

Remember to back up your files first.

Highlighting in popular apps

Support depends on whether the app keeps the <mark> tag or reads ==.

AppSupportNotes
GitHubDiffers<mark> is highlighted; ==text== is shown as typed.
ObsidianSupported==text== and <mark> both work.
TyporaDiffers==text== works once Highlight is turned on in the Markdown settings.
NotionNot supportedNo typed syntax; highlight with the color menu.
Discord / SlackNot supportedNo highlighting; use bold text.

Questions and answers

Does Markdown have a highlight syntax?

Not in CommonMark or GitHub Flavored Markdown. ==text== is an extension that Obsidian, Typora and some other editors support. Elsewhere, use the HTML <mark> tag.

How do I highlight text on GitHub?

Use <mark>text</mark>. GitHub does not support ==text==.

How do I change the highlight color?

Markdown has no color option. Where CSS is allowed, add a style: <mark style="background: #bbf7d0">text</mark>. GitHub and many other sites remove style.

Why does ==text== show the equals signs?

The app does not support the extension. Use <mark> instead, or turn the syntax on if the editor has a setting for it, as Typora does.

Can I highlight text in Discord or Slack?

No. Neither app has highlighting; use bold text instead.

Does a highlight survive a Word or PDF export?

With <mark>, yes: Markdown to Word turns it into a yellow highlight, and Markdown to PDF prints it.