How to do text highlight in markdown

In this post, we will see how we can highlight text in markdown.

In markdown, there is no native way to highlight text, however, markdown allows us to use HTML if we need any feature that is not in markdown.

So to highlight text, we can use the <mark> tag in our markdown document.

<mark>Text highlight</mark> in markdown

The output will be

Text highlight in markdown

To change the color of the highlighted text, we can use some inline styles.

<mark style="background-color:pink">Text Highlighting</mark> in markdown


Text Highlighting in markdown

We can also use the <span> tag with inline styles to do a text highlighting in markdown.

<span style="background-color:yellow">Text Highlight</span> in markdown


Text Highlight in markdown

Some markdown editors also support the double equal (==) sign to highlight text.


A list of editors that support double equal signs are:

  • Typora
  • Obsidian
  • Quilt
  • IA Writer

Note: In Typora editor, the user must enable double equals for highlighting first in Preferences > Markdown


To highlight text in markdown we can use the <mark> HTML tag or the <span>tag with inline style.

Even though some text editors support double equal (==), it is better to use something which is supported by any editor.

So it’s better to go with the <mark> tag for text highlighting.

Related Articles:

How to write superscript and subscript in markdown

How to center align an image in markdown

How to underline in markdown

How to change image size in markdown in GitHub

How to make horizontal line in markdown

Easy Way to add Emoji in markdown with VS Code

How to write comments in a Markdown File

Scroll to Top