Markdown cheatsheet · Highlight

How to highlight text in markdown

Standard markdown has no highlighter. Two extensions cover most tools: ==double equals== where the editor supports it, and the HTML <mark> tag where it does not.

==Double equals== (Obsidian and friends)

Wrap text in two equals signs on each side. Supporting editors render it as a <mark> element, the HTML equivalent of a highlighter stroke.

You type
==The key point== of the meeting.
You get (in Obsidian)

The key point of the meeting.

This works in Obsidian, iA Writer, and tools built on the markdown-it parser with the markdown-it-mark plugin enabled. It is not part of CommonMark or GFM: paste the same line into a GitHub README and you get literal equals signs.

No spaces: the equals signs must touch the text. == spaced out == stays literal even in editors that support the syntax.

The <mark> tag (GitHub and most HTML-friendly renderers)

Markdown passes inline HTML through wherever the renderer allows it, and GitHub's sanitizer keeps <mark> on its allowlist. So this version works in READMEs, issues, pull requests and comments, and in any other renderer that does not strip HTML.

You type
This is <mark>the key point</mark>.
You get

This is the key point.

Because it is plain HTML, it also survives conversion to HTML untouched.

When neither works

Some pipelines strip inline HTML and do not know the == extension either. There is no third trick; fall back to bold, the one emphasis every renderer agrees on. See the bold and italic guide.

Common questions

Can I change the highlight color?

Not in the markdown itself; the renderer decides. Browsers give <mark> a yellow background by default, and apps restyle it (Obsidian themes often do). On GitHub, inline style attributes are stripped during sanitization, so <mark style="..."> keeps the tag but loses the color.

Is == coming to standard markdown?

There is no sign of it. Highlighting has been discussed on the CommonMark forum for years without entering the spec, so treat == as a tool-specific convenience, not something portable.

Related syntax

· All markdown guides

Less syntax. More writing.

Download maxdown

Free · no account · macOS, Windows & Linux