Home Markdown Quick Syntax
Post
Cancel

Markdown Quick Syntax

Cheat Sheet for Markdown

Objective


Article aimed at quick glance for all the code syntax or act as a reference point for Markdown language!

Heading


# for Heading 1, ## for Heading 2, .. ###### for Heading 6

== for Heading 1, – for Heading 2

Example:

1
2
    Heading
    ==

Heading

Paragraph


Blank line added before and after a paragraph

Example:

1
2
3
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

Text Styling


  1. Bold Add 2 ** before and after the word / character
  2. Italics Add 1 * before and after the word / character
  3. Bold & Italics Add 3 *** before and after the word / character

New Line


Add a \ before and after a paragraph to insert line gap

Example:

1
2
3
line 1 with \
\
line 2

line 1 with \
line 2
line 1 without \ line 2 will fall in same line

Line Breaks


Creating line breaks before paragraph using \

Example:

1
2
\
Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Output for line break start


Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Output for line break end

Horizontal rules


Add any of these symbol after a empty line *** or --- or ___


after ruler

List


There are two types of list

Ordered lists

Add numbers in any order with a number, a dot and a space 1.

Example:

1
2
1. item one
1. item two
  1. list one
  2. list two

Unordered lists

Add any of the following symbol - or + or *

Example:

1
2
3
4
- list item 1
    - sub list item 1
+ list item 2
* list item 3
  • list item 1
    • sub list item 1
  • list item 2
  • list item 3

Table


Add a pipe symbol before the start and end | heading |

Example:

1
2
3
4
    | Header 1    | Header 2 |
    | ----------- | ---------- |
    | data row 1  | data row 1 |
    | data row 2  | data row 2 |
Header 1Header 2
data row 1data row 1
data row 2data row 2

Images


To add images add an ! follwed by box brackets and image location hyperlink within parenthesis.

Example:

1
![alt text](image.jpg)

Blockquotes


To create a new blockquote add this symbol > on new line on first column

1
2
1. Nested blockquotes
    Add the same symbol twice `>>` to create a nested block

blocked quote

nested blockquote

1
2
2. Code blocks
    An indent with 4 spaces or 1 tab creates a code block

tab / indented

1
2
3
4
5
6
7
8
9
10
11
3. Fenced Code blocks
    Adding 3 ``` (backticks) or 3 `~~~` will create a fenced code blocks
    
    Example:
    
    ```
    {
        "firstname":"John",
        "lastname":"Doe"
    }
    ```
1
2
3
4
{
    "firstname":"John",
    "lastname":"Doe"
}
1
2
3
4
5
6
7
8
9
10
11
4. Formating Code block languages
    Adding 3 ``` with language name will create a language formating
    
    Example:
    
    ```json
    {
        "firstname":"John",
        "lastname":"Doe"
    }
    ```
1
2
3
4
{
    "firstname":"John",
    "lastname":"Doe"
}

Types of links

1
2
3
4
5
6
7
8
1. Titles
    Put the text in box brackets immediately followed by url within parenthesis
    To add onhover text, add a space and the description within double quotes next to hyperlink url
    
    Example:
     
    [Google](https://www.google.com)
    [Google](https://www.google.com "search engine for all needs")

Google

1
2
3
4
5
6
2. URL
    To display URL add the hyperlink within the arrow brackets 
    
    Example:
    
    <https://www.google.com>

https://www.google.com

1
2
3
4
5
6
7
8
3. Reference
    To create reference links for any text or paragraph, add numbers within box brackets and after a line gap create hyperlink url reference to the numbers added above.
    
    Example:
    
    [Google Wiki][1]

    [1]: https://en.wikipedia.org/wiki/Google

Google-Wiki

1
2
3
4
5
6
4. Email
    To create a mailto hyperlink, add the email within arrow brackets
    
    Example:
    
    <author@domain.com>

author@domain.com

1
2
3
4
5
6
7
8
9
10
5. Images
    As we know adding `!` immediately followed by box brackets with text acting as ALT TEXT and image url within parenthesis
    Optionally description can be added for image onhover
    This image set in box brackets immediately followed by hyperlink url within parenthesis makes the image hyperlinked
    
    Example:
    
    ![alt-text](image.jpeg)
    ![alt-text](image.jpeg "image description")
    [![alt-text](image.jpeg "image description")](https://www.google.com)

image

Additional Syntax


1
2
3
4
5
6
7
8
1. Footnote
    Adding `^` to the reference link creates the foot note
    
    Example:
    
    Sample footnote created.[^1]

    [^1]: This is the footnote 

Sample footnote created.1

1
2
3
4
5
6
2. Strikethrough
    Adding 2 ~~ will create a strikethrough
    
    Example:
    
    This will ~~strikethrough~~ the word inbetween

This will strikethrough the word inbetween

1
2
3
4
5
6
7
3. Highlight
    To highlight a word or sentence, double equal `==` between the word or if application supports then add html supported tag <mark>
    
    Example:
    
    In this line, this word ==highlight== will be highlighted.
    In this line, this word <mark>highlight</mark> will be highlighted.

In this line, this word highlight will be highlighted.

1
2
3
4
5
6
7
4. Subscript
    To create subscript, Single tilde `~` between the word or if application supports then add the tag <sub> between the word
    
    Example:
    
    H~2~O
    H<sub>2</sub>O

H2O

1
2
3
4
5
6
7
5. Superscript
    Single backtick `^` between the word or if application supports then add the html supported tag <sup> 
    
    Example:
    
    X^2^
    X<sup>2</sup>

X2

Escaping characters


All the above character literals used can be escaped using the \
\
Example:

1
* Conditions Apply 

but output renders as bullet point

  • Conditions Apply
1
to this escape this, add the backslash 

* Conditions Apply

1
2
Different characters that can be escaped are
\ ` * _ { } [ ] < > ( ) # + - . ! |
  1. This is the footnote 

This post is licensed under CC BY 4.0 by the author.

Hello World

Git Basic Commands

Comments powered by Disqus.