Javatpoint Logo
Javatpoint Logo

Comments in Markdown

Comments are used to explain a certain part, name, word, or sentence in a code or document. The text in the comments section does not appear the output. It is only visible in the input file of Markdown.

Shortcut Key

The shortcut key to make any word, line, or paragraph as comments is:

Comments in Markdown

The steps are as follows:

  1. Select the text that we want to mark as comments.
  2. Press the shortcut key.

The highlighted text will appear as comments.

For example,


The syntax to create comments is:

The comment open with a less than symbol, exclamatory symbol and two dashes. Similarly, it closes with two dashes and a greater than symbol. The syntax can also be specified using the keyboard keys.

We can use the same syntax to create comments in visual studio and other editors.


Here, we will discuss an example of highlighted text. The example is taken for reference to explain the comments in Markdown.

Example 1:

The command used to highlight the words, sentences, or paragraphs in Markdown starts and ends with two equal symbols.

==The text is highlighted here==


The text is highlighted here  

<!--Here, the text enclosed between four equal symbols appears at the output as the text highlighted in yellow. -->

<!--A sentence enclosed in such syntax is a comment and does not appear at the output-->

We can remove the syntax to convert the comments into the Markdown text to be visible at the output.

Next TopicTables in Markdown

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA