Markdown Highlight: How to Highlight Text with Examples

How to highlight text in Markdown — syntax, platform support, and workarounds

Highlight Syntax

Wrap text in double equals signs == to highlight it. The result is text with a yellow background, like a marker pen on paper.

This is highlighted text in a sentence.

==highlighted text==

Important: highlight is not part of standard Markdown or CommonMark. It is an extended syntax supported only by some processors, such as Obsidian, Typora, and MDViewer. On platforms that do not support it, ==text== appears as literal text with the equals signs visible. If you need wider compatibility, use the HTML <mark> tag described below.

HTML Mark Tag

The HTML <mark> tag is the alternative to ==. Markdown allows inline HTML, so processors that render it will highlight the text with a yellow background by default. It is more widely supported than ==, although some platforms (including GitHub) strip it for security reasons.

This is highlighted text using the mark tag.

<mark>highlighted text</mark>

Custom Highlight Colors

The == syntax only produces the default highlight color. To use other colors, use the <mark> tag with an inline style attribute and set background-color.

yellow, green, and red highlights

<mark style="background-color: #FFEB3B;">yellow</mark>
<mark style="background-color: #A5D6A7;">green</mark>
<mark style="background-color: #EF9A9A;">red</mark>

Inline styles only work in processors that allow raw HTML with style attributes. Many platforms sanitize them away, so test in the app where the document will actually be read.

Highlight in Different Contexts

Highlighting works inline, so you can use it inside paragraphs, lists, tables, and blockquotes. The examples below use the == syntax; swap in <mark> if your processor does not support it.

Highlight in paragraphs

Remember to save your work before closing the app.

Remember to ==save your work== before closing the app.

Highlight in lists

  • Install the latest version
  • Open your .md file
  • Check the preview
- Install the ==latest version==
- Open your ==.md file==
- Check the preview

Highlight in tables

FeatureStatus
Dark modeSupported
ExportComing soon
| Feature   | Status          |
|-----------|-----------------|
| Dark mode | ==Supported==   |
| Export    | Coming soon     |

Highlight in blockquotes

Note: This step cannot be undone.

> **Note:** This step ==cannot be undone==.

Platform Support

Support for highlighting varies widely. Here is which method works where.

Platform==text==<mark> tag
Obsidian✅✅
Typora✅✅
MDViewer✅✅
VS Code❌✅
GitLab❌✅
GitHub❌❌ (stripped)
Slack❌❌

In short: ==text== works in Markdown-focused editors like Obsidian, Typora, and MDViewer, while the <mark> tag works anywhere that renders inline HTML. GitHub and Slack support neither.

Workarounds for GitHub

GitHub strips both ==text== and <mark>, so you need another way to draw attention to text in READMEs, issues, and pull requests.

Use bold text

Bold is supported everywhere and is the simplest way to make text stand out.

This step is important.

This step is **important**.

Use emoji markers

An emoji at the start of a line works as a visual highlight on any platform.

⚠️ Warning: back up your files first.
✅ Tests passing
❌ Build failing

⚠️ **Warning:** back up your files first.
✅ Tests passing
❌ Build failing

Use diff code blocks for red and green

GitHub renders diff code blocks with red and green line backgrounds. Lines starting with + are green and lines starting with - are red.

- old value+ new value
```diff
- old value
+ new value
```

Common Mistakes

Using a single equals sign

Highlight needs two equals signs on each side. A single = is just literal text.

MarkdownResult
==works==works
=broken==broken=
==works==
=broken=

Expecting ==text== to work on GitHub

The most common mistake is writing ==text== in a README and expecting a highlight. GitHub does not support it, so readers see the equals signs. Use one of the workarounds above instead.

Forgetting the closing ==

If you open with == but forget to close it, nothing is highlighted and the equals signs show up as literal text. Make sure every opening == has a matching closing pair.

==this is highlighted==
==this is not, the closing marker is missing

FAQ

How do I highlight text in Markdown?

Wrap the text in double equals signs: ==your text==. This is an extended syntax supported by Obsidian, Typora, and MDViewer. For broader support, use the HTML tag <mark>your text</mark>. Highlight is not part of standard CommonMark.

Does GitHub support highlighted text in Markdown?

No. GitHub strips both ==text== and the <mark> tag. To draw attention to text on GitHub, use bold, emoji markers such as ⚠️, or a diff code block for red and green lines.

What is the difference between ==text== and the mark tag?

Both produce highlighted text, but ==text== is a Markdown extension that only some processors understand, while <mark> is standard HTML that any processor rendering inline HTML can display. The <mark> tag also allows custom colors through inline styles, which == does not.

Preview Your Markdown with MDViewer

MDViewer is a native macOS app for reading and previewing Markdown files. Double-click any .md file in Finder and see it rendered instantly — highlights, bold, tables, code blocks, and more. Lite is free; Pro adds editing, Git history, and PDF export.

Download MDViewer

Requires macOS 13.0 or later. Intel and Apple Silicon.