Javatpoint Logo
Javatpoint Logo

Text highlight in Markdown

Text highlight is used to highlight the text in the document. It is similar to the highlight command in the Microsoft word and other text formatting documents. We can use the highlight command for single word, multiple words, sentence, paragraphs etc. depending on the formatting style for the document.

In Markdown, any text inserted between the two equal symbols (==) appears as the text highlighted in yellow at the output.

For example,

Output:

Text

The two equal symbols should appear at the beginning and at the end. Otherwise, the output may not be the desired highlighted text.

Note: There should be no space between the two equal symbols and the text. All the symbols and the text should be written without any space. Otherwise, the equal symbol will be considered as the text by default.

Error

The error arises when we insert an extra space between the symbols and text.

For example,

There is one space before and after the text in both the cases.

Output:

The output will appear as:

== Text is written here ==

The output is the same as the input due to the extra spaces. Hence, such spaces should be avoided.

Text highlight in visual code

In visual code, we can also use the HTML tag <mark> ... </mark> to highlight the text.

For example,

Output:

 This the text 

Examples

Let's discuss two examples based on text highlighting in Markdown.

Example 1:

The Markdown command to bold the text is as follows:

Output:

The purpose of living is to have a healthy, happy, and a cheerful life.

Example 2:

Output:

Markdown is one of the simple and easiest plaintext language as compared to the other text formatting documents. 






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA