To highlight text in Markdown, wrap it in double equals signs: ==highlighted==. This marks the text with a colored background, like a highlighter pen. The syntax is not part of CommonMark, GitHub Flavored Markdown, MultiMarkdown, or classic Markdown Extra. It works in Obsidian and in Pandoc only with the mark extension enabled. For highlighting that works anywhere, use the <mark> HTML tag instead.
Markdown highlight syntax reference
| Goal | Syntax | Renders as |
|---|---|---|
| Highlight (extended) | ==important== |
important on a colored background |
| Portable highlight | <mark>important</mark> |
important on a colored background |
Markdown highlighting key facts
- To highlight text, wrap it in double equals signs,
==like this==, in a tool that supports the syntax. - The
==highlight==shorthand is not in CommonMark, GitHub Flavored Markdown, MultiMarkdown, or classic Markdown Extra. - Obsidian supports
==text==natively, and Pandoc supports it only when themarkextension is enabled, which is off by default. - The
<mark>HTML tag is the portable option and works anywhere inline HTML is allowed, including GitHub. - Both the
==shorthand and the<mark>tag compile to the same HTML<mark>element, which browsers render with a yellow background by default. - Highlighting is an inline span, so it marks a run of text within a line, not a whole block on its own.
Use highlight syntax only in a known renderer
The ==highlight== convention is not part of CommonMark or GFM. It works in some note-taking and publishing systems, including Obsidian, but unsupported renderers display the equals signs as ordinary text.
If highlighting is essential and trusted inline HTML is allowed, <mark>text</mark> is the usual fallback. Some platforms sanitize or remove raw HTML, so test the final destination. For emphasis that must remain portable, use bold or italic Markdown and write the sentence so its meaning does not depend on colour or highlighting alone.
Basic syntax
Where highlighting is supported, wrap the text in two equals signs on each side.
Markdown
This is ==really important== to remember.
Rendered output (in a supporting tool such as Obsidian)
This is really important to remember.
HTML output
<p>This is <mark>really important</mark> to remember.</p>
The output is the HTML <mark> element, which browsers render with a yellow background by default. In a renderer that does not support the syntax, the literal equals signs appear instead:
<p>This is ==really important== to remember.</p>
The portable HTML fallback
Because == is not widely supported, the reliable cross-platform way to highlight is the <mark> HTML tag. Any renderer that allows inline HTML, which is most of them, handles it.
Markdown
Use the <mark>mark tag</mark> for portable highlighting.
Rendered output
Use the mark tag for portable highlighting.
HTML output
<p>Use the <mark>mark tag</mark> for portable highlighting.</p>
Use this form whenever the document might be read on GitHub or in a plain CommonMark renderer, where the == shorthand does not work.
Highlight is inline only
Highlighting is an inline span, so it applies within a line of text and can sit alongside other inline formatting. It is not a block-level construct and does not highlight whole paragraphs on its own.
Markdown
You can combine ==highlight== with **bold** and *italic* in one sentence.
Rendered output (in a supporting tool)
You can combine highlight with bold and italic in one sentence.
The markers must hug the text with no space just inside them, the same rule that applies to other inline emphasis. == text == with inner spaces usually will not highlight.
Flavor differences
Highlighting is one of the least portable Markdown features. The == syntax is absent from the major specifications and is supported natively only by some note tools and by Pandoc behind an extension.
| Flavor | ==highlight== support |
Notes |
|---|---|---|
| CommonMark | No | Not in the spec. <mark> HTML works if inline HTML is allowed. |
| GitHub Flavored Markdown (GFM) | No | The == syntax does not render. Use the <mark> HTML tag instead. |
| MultiMarkdown | No | Not defined in MultiMarkdown. |
| Markdown Extra | No | Classic michelf Markdown Extra does not define == highlighting. |
| Pandoc | Partial | Only with the mark extension, added in Pandoc 3.0 and off by default. Enable with markdown+mark. |
The practical rule: do not assume == will render anywhere. It is safe only in tools you know support it, such as Obsidian, or in a Pandoc pipeline where you have turned on the mark extension. For everything else, use the <mark> tag.
Other platforms (Obsidian, Notion)
Note tools are where == highlighting is most at home, but even they differ:
- Obsidian: supports
==text==natively and renders it with a highlight background. This is the tool most associated with the syntax. - Notion: highlights text through its own formatting menu and slash commands rather than the
==Markdown syntax. A pasted==text==typically stays as literal text with the equals signs showing.
For the full comparison of how flavors differ across all elements, see Markdown flavors.
How Markdific renders it
Markdific renders text and standard Markdown elements. The <mark> HTML tag is the portable way to highlight text where inline HTML is supported. The ==text== shorthand used by Obsidian and by Pandoc's mark extension is non-standard and may appear as literal text unless the renderer supports it.
For highlighting that renders consistently, the <mark> HTML tag is the safest choice. Try it in the Markdific online editor.
Common mistakes and gotchas
- Assuming
==works everywhere. It does not. On GitHub and most renderers,==text==shows the literal equals signs. - Expecting it in CommonMark or GFM. Neither defines highlighting. Use the
<mark>tag there. - Forgetting the Pandoc extension. Pandoc highlights
==only when themarkextension is enabled, which is off by default. - Adding spaces inside the markers.
== text ==usually fails, like other inline emphasis. Keep the markers tight against the text. - Confusing highlight with bold or emphasis. Highlighting sets a background color; it is not the same as bold or italic and needs its own syntax or the
<mark>tag. - Relying on it for portable documents. If content will move between tools, use
<mark>so the highlight survives.
Best practices
- For portable documents, use the
<mark>HTML tag rather than the==shorthand. - Reserve
==text==for tools you know support it, such as Obsidian, or a Pandoc build with themarkextension enabled. - Keep the markers tight against the text, with no inner spaces.
- Use highlighting sparingly. Marking too much text defeats the purpose of drawing the eye.
- Do not rely on highlight color alone to carry required meaning, since a renderer that ignores the syntax will drop the emphasis entirely.
HTML equivalent
Both the == shorthand, where supported, and the HTML fallback compile to the same <mark> element.
Markdown
Remember ==this line== and this <mark>one too</mark>.
HTML output
<p>Remember <mark>this line</mark> and this <mark>one too</mark>.</p>
FAQ
How do you highlight text in Markdown?
Wrap the text in double equals signs, ==like this==, in a tool that supports it, such as Obsidian. For portable highlighting, use the <mark> HTML tag instead.
Is ==highlight== part of standard Markdown?
No. It is not defined by CommonMark, GitHub Flavored Markdown, MultiMarkdown, or classic Markdown Extra. It is an extension supported by some tools.
Does GitHub support == highlighting?
No. On GitHub the ==text== syntax shows the literal equals signs. To highlight on GitHub, use the <mark> HTML tag.
Does Pandoc support highlighting?
Only with the mark extension, which was added in Pandoc 3.0 and is off by default. Enable it with a format like markdown+mark.
What is the most portable way to highlight text in Markdown?
The HTML <mark> tag. Nearly every renderer that allows inline HTML supports it, and it produces the same highlighted output as the == shorthand.
Why does ==text== show literal equals signs?
Because the renderer does not support the highlight syntax. CommonMark, GFM, MultiMarkdown, and Pandoc without the mark extension all leave the equals signs as plain text.
Does Obsidian support highlighting?
Yes. Obsidian renders ==text== natively with a highlight background, which is why the syntax is most associated with note-taking tools.
What HTML does a Markdown highlight produce?
The <mark> element, which browsers render with a yellow background by default. The exact color can be changed with CSS.
How do you change the highlight color in Markdown?
The Markdown syntax itself has no color option. Because it produces a <mark> element, you change the color with CSS, for example a rule like mark { background: #cfe8ff; }, or by writing the tag with an inline style such as <mark style="background: #cfe8ff;">text</mark> where inline HTML and styles are allowed.
Can you highlight a whole paragraph in Markdown?
Not with a single inline highlight, since == and <mark> mark a run of text within a line rather than a block. To shade a whole block, wrap it in a <div> with a background style, or apply the <mark> tag to each line, on renderers that allow inline HTML.
What is the difference between highlight and bold in Markdown?
Highlighting sets a background color behind the text using ==text== or <mark>, while bold uses **text** to make the letters heavier. They are separate features, and you can combine them on the same run of text.
Does Notion support == highlighting?
No. Notion highlights text through its own formatting menu and slash commands rather than the == Markdown syntax. Pasted ==text== usually stays as literal text with the equals signs showing.
Sources and compatibility references
Use these primary references for syntax rules. Renderer behaviour can still vary by version and configuration, so preview important documents in their final destination.
Related pages
- Markdown documentation hub
- Emphasis: bold and italic
- Strikethrough in Markdown
- Subscript and superscript in Markdown
- Inline HTML in Markdown
- Markdown flavors compared
