- Lightweight Mark-up Language with plain text formatting syntax
- Mainly built for readability and ease of use for documentations
- It can be converted into HTML, XHTML and other formats
- Used for Readme files in GitHub, Forum and Blog Posts and in Static Site Generators
- It uses .md as file extension
- There are various other versions or extensions of Markdown like PHP Markdown, GitHub Markdown (which has feature of adding Tables, Task Lists, etc) and so on
- Headings
- Blocks of Code
- Lists
- Images
- Emphasis (Bold, Italic, Strikethrough)
- Links
- Blockquotes
- Links
- Horizontal Rules
- Images
- VSCode by Microsoft: Free and Best (Recommended)
- Atom by GitHub
Below IDE's are built especially for Markdown
- MarkPad : Paid
- HarooPad : Paid
- MarkdownPad 2 : Paid
- Typora : Paid
- Using VSCode, Install Auto-Open Markdown Extension - It helps in viewing Markdown side by side in real-time
- Purpose: It helps in maintaining proper indentations in documentation
*
or-
symbols are used- It is also known as Un-Ordered List
Syntax
* Statement
For Example
- Statement 1
- Statement 2
- Statement3
- Purpose: To leave a one blank line after the sentence
Syntax
Sample Text1 from Paragraph1
Sample Text2 from Paragraph2
For Example
Sample Text from Paragraph 1 Sample Text from Paragraph 2
- Sample Text from Paragraph 1
- Sample Text from Paragraph 2
- Purpose: Used for better understanding of codebase for developers
- It is ignored by the browser to render
Syntax
<!-- Comments -->
For Example
- Statement 1 <!-- Comment 1 -->
- Statement 2 <!-- Comment 2 -->
- Statement 3 <!-- Comment 3 -->
- Statement 4 <!-- Comment 4 -->
- Statement 5 <!-- Comment 5 -->
- Purpose: To well format the headings in the documentation
#
symbol is used before the statements- With single
#
represents the main heading - With multiple
##..
represents the sub headings - NOTE: By default, Main Heading
(#)
only has horizontal rule with it
Syntax
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
For Example
- Purpose: To format the text in Italic
*
or_
symbols are used
Syntax
*Sample Text*
_Sample Text_
For Example
- This Sample Text is Italic
<!-- Using *Italic* -->
- This Sample Text is Italic
<!-- Using _Italic_ -->
- Purpose: To format the text in Bold
**
or__
symbols are used
Syntax
**Sample Text**
__Sample Text__
For Example
- This Sample Text is Strong
<!-- Using **Strong** -->
- This Sample Text is Strong
<!-- Using __Strong__ -->
- Purpose: To format the text in Strikethrough
~~
symbols is used
Syntax
~~Sample Text~~
For Example
- This Sample Text is
Strikethrough
- Purpose: Adds a horizontal rule (line) for better separation
---
or___
symbols are used
Syntax
Sample Text 1
---
Sample Text 2
___
For Example
-
Sample Text 1
-
<!-- Used below --- -->
-
Sample Text 2
-
<!-- Used below ___ -->
- Purpose: Since in markdown symbols are reserved as syntax but to explicitly display them \ symbol is used
\
symbol is used
Syntax
\<Symbol> Sample Texts \<Symbol>
For Example
- This is a Sample Text with *symbol* used for Italic Emphasis
- This is a Sample Text with ** symbol ** used for Bold Emphasis
- Purpose: To format text in block quotes
>
symbol is used
Syntax
> Sample Text
For Example
-
This is a Sample Text of Blockquotes
- Purpose: To declare the Hyperlink
( )
is used for the Link (URL) and[ ]
is used for the title on the link
Syntax
[Link Title](URL)
- To add title on hovering over the link,
" "
are used in '( )' after the URL ends
[Link Title](URL "Title on Hover")
For Example
- Purpose: To display Un-Ordered Lists
- Only one
*
symbol is used
Syntax
* Item Name
- For Nested Un-Ordered Lists
Syntax
* Item Name 1
* Nested Item
For Example
- Item 1
- Nested Item 1
- Nested Item 2
- Item 2
- Item 3
- Purpose: To display the Ordered Lists
1.
is used and if other than 1 is used then it is not considered as Ordered List- Incrementation is done automatically
Syntax
1. Item Name
For Example
- Item Name
- Item Name
- Item Name
- Item Name
- Purpose: To display Programming Languages Syntaxes
- ` ` symbol is used
Syntax
`<p>This is Paragraph Tag in HTML</p>`
For Example
<p>Paragraph Tag in HTML</p>
<b>Body Tag in HTML</b>
- Purpose: To display Images
- It is similar to Links in syntax but
!
is added before it
Syntax
![Image Title](ImageURL)
For Example
![Markdown Logo](https://markdown-here.com/img/icon256.png)
- Purpose: To display Programming Languages Syntaxes
- ' ``` ' symbol is used
- Programming Language name can be added to specify code block language
- By default on no specific mention of programming language, bash is considered
Syntax
```ProgrammingLanguageName
npm install
npm start
```
For Example
- Bash Command
npm install
npm start
- Java
public static void main(String args[]){
System.out.println("Hello World in GitHub Markdown Code Block!");
}
- C++
#include<iostream.h>
using namespace std;
int main(){
cout<<"Hello World in GitHub Markdown Code Block!";
return 0;
}
- JavaScript
function add(num1, num2){
return num1 + num2;
}
- Python
def add(num1, num2):
return num1 + num2
- Purpose: To display tables
|
symbol is used- TRICK
- Make the table in Microsoft Word or Excel
- Install "Excel to Markdown table" extension in VSCode
- Copy the table from the source file
- Paste it in the .md file by using SHIFT + ALT + V shortcut key
- Copy the markdown format of the table and paste in the desired .md file
Syntax
| Column 1 | Column 2 |
| -------- | -------- |
| Content | Content |
For Example
Name | |
---|---|
Student 1 | student123@gmail.com |
Student 2 | student456@gmail.com |
- Purpose: To display Checkboxes
[ ]
symbol is used which is Un-Ordered List- x in square brackets represents the completed tasks and otherwise incomplete
Syntax
* [x]Task 1
* [ ]Task 2
For Example
- Learn Markdown
<!-- Complete Task-->
- Push to GitHub Repository
<!-- Incomplete Task-->
- Pending
<!-- Incomplete Task-->
- Name - Abhinav
- GitHub - github.com/abhinavg916