Quick Reference to Markdown Syntax

Using Markdown

Adding Comments in Markdown

There is no straightforward way of adding comments in Markdown. Still, here's a neat trick you can use and add comments.

Unlike HTML, Markdown doesn't provide a proper way to add comments. Perhaps because it was not created to write codes.

But that doesn't mean you cannot add comments in Markdown. Different implementations of Markdown has different ways of adding comments.

Let me share the most reliable one with you.

How to add comments in Markdown?

To add a comment in Markdown, first add an empty line (by pressing enter key twice) and use the following code:

[comment]: Comment text

Actually, you can use anything instead of [comment]. All you need is something in the brackets followed by the colon (and an empty line in the previous line). Anything on this line is not shown in the rendered text.

Adding comments in Markdown
Examples of comments in Markdown (click to enlarge)

Comment, please πŸ’¬

As I said, there is no proper way of adding comments in Markdown. Why should be there? It was created to write text in a simple language, not for programming web pages. This trick that I just discussed is actually like adding reference links in Markdown.

But it works and in some rare cases if you need to add comments that is not seen in the rendered text, you can use this trick.

Markdown is all about syntax. The more you practice, the easier it gets to write in Markdown.

I have created this cheat sheet to help you remember the common Markdown syntax. Feel free to download it, print it (if you want) and keep it at your desk for quick reference.

If you want a detailed explanation of Markdown syntax, we have a guide for that as well.

Basic Markdown Syntax Explained [With Free Cheat Sheet]
Learning markdown could help you a lot with writing for web. Here’s a complete beginner’s guide to Markdown syntax with downloadable cheat sheet.

I hope you find this helpful in adding links in Markdown. If you have any questions or suggestions, please feel free to leave a comment.