How to do text highlight in markdown

featured Image

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

Output:

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

Output:

Text Highlight in markdown

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

==highlight==

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

Conclusion:

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

Related Posts

git commands with example

Top 40 Git commands with Examples

GitHub has become an essential tool for developers to manage, store, and collaborate with other developers on software projects. With its simple powerful git-based version control system, GitHub allows users…

Read more
Check GitHub Account in the Terminal

Check GitHub Account in the Terminal

GitHub is an integral tool for developers to store, manage, and collaborate on software projects with other developers. And as we work more and more in the command line it…

Read more
featured Image

How to make list of objects in Netlify CMS using list and object Widget

Here in this Netlify CMS tutorial we will how easily we can make a list of objects using list and object widgets. This will allow us to add multiple objects…

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *