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:
- 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.
- Line continuation | Long statement in Multiple lines in Python
- Find Length of Dictionary in Python with Examples
- Reverse an Array in Python (Using Numpy And Array Module)
- Python import from parent directory
- How to use Pi in Python? (math and numpy module)
- FileNotFoundError: No such file or directory Error Python