What is Markdown?
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text. It is used by the developers to make a "readme.md" file which has all the details or how to use guide for a particular project. It is mostly used for documentation of a project.
Basic Syntax
1. Heading
"#" is used to denote heading in markdown.
Single "#" meansh1
, "##" means h2
, "###" means h3
and so on till h6
.
Note : Adding a space after "#" is necessary.
Example
# h1
## h2
### h3
#### h4
##### h5
###### h6
Output
2. Bold
"**" before and after the text is used to bold a particular text in markdown. "__" can also be used before and after the text to achieve the same thing.
Example
**some bold text**
Output
3. Italic
"*" before and after the text is used to change a particular text in italics in markdown. "_" can also be used before and after the text to achieve the same thing.
Example
*some italic text*
Output
4. Blockquote
">" before the text will convert that text into blockquotes in markdown. Note : Adding a space after ">" is necessary.
Example
> this is a blockquote
Output
5. Ordered List
You can add an ordered list in the markdown by simply writing "1. one", "2. two"....."10. ten". It doesn't matter if you number them anything, they will always be in order. Note : Adding a space after "1." is necessary. You can add a sub list using tab key.
Example
1. one
2. two
3. three
Output
6. Unordered List
You can add an ordered list in the markdown by simply writing "- one", "- two"....."- ten". It doesn't matter if you number them anything, they will always be in order. Note : Adding a space after "-" is necessary. You can add a sub list using tab key.
Example
- one
- two
- three
- one sub
- two sub
Output
7. Single keyword code
If we want to add a keyword or a single line of code in between, we can wrap the keyword in "`".
Example
some of keywords are `let`, `for`, etc.
Output
As you can notice the difference in the color of those words.
8. Multi-Line code
If we want to add a code block, we can wrap the code part in "```".
Example
Output
9. Link
Syntax for adding a link in markdown is []()
.
The title which you want to display goes in [] and the url goes into ().
Example
[LCO](https://learncodeonline.in)
[Google](https://google.com)
Output
10. Image
Syntax for adding a link in markdown is ![]()
.
The title which you want to display incase the image does not show up goes in [] and the url or local directory path goes into ().
Example

Output
11. Strikethrough
Adding "~~" before and after the text will add a strikethrough to the particular text.
Example
~~999~~ 699
Output
These were some common elements used in markdown. Surely there are some more to explore. You can explore more of them here (references for this article) :
Thank you for reading this article, I hope you have learnt something new and valuable. See you in the next article!