Mastering Markdown : The Complete Guide

Subscribe to my newsletter and never miss my upcoming articles

What is Markdown?

Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown.

Table of Contents

Headings [#headings]

# Heading 1 
## Heading 2 
### Heading 3 
#### Heading 4 
##### Heading 5 
###### Heading 6

Output-

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

---------------------

Line Breaks

Line 1
<br>
Line 2

Output - Line 1
Line 2

----------------

Emphasis

Bold

I love **bold text**.
I love __bold text__.
Love**is**bold

Output I love bold text. I love bold text. Loveisbold


Italic

this is *italics text*
this is _italics text_
thisis*italics*text

Output- this is italics text this is italics text thisisitalicstext


Strikethrough

~~The world is flat.~~ We now know that the world is round.

Output -

The world is flat. We now know that the world is round.

-----------------

Blockquotes

Single Line

> This is a Single line Blockquote

Output-

This is a Single line Blockquote


Blockquotes with Multiple Paragraphs

> This the first paragraph.
>
> And this is the second paragraph.

Output-

This the first paragraph.

And this is the second paragraph.


Nested Blockquotes

> This the first paragraph.
>
>> And this is the nested paragraph.

Output-

This the first paragraph.

And this is the nested paragraph.

---------------

Lists

Ordered Lists

1. First item
2. Second item
3. Third item
4. Fourth item

1. First item
1. Second item
1. Third item
1. Fourth item

1. First item
8. Second item
3. Third item
5. Fourth item

Output-

  1. First item
  2. Second item
  3. Third item
  4. Fourth item
  5. First item
  6. Second item
  7. Third item
  8. Fourth item
  9. First item
  10. Second item
  11. Third item
  12. Fourth item

Nesting List Items

1. First item
2. Second item
3. Third item
    1. Indented item
    2. Indented item
4. Fourth item

Output-

  1. First item
  2. Second item
  3. Third item
    1. Indented item
    2. Indented item
  4. Fourth item

Unordered Lists

- First item
- Second item
- Third item
- Fourth item

* First item
* Second item
* Third item
* Fourth item

+ First item
* Second item
- Third item
+ Fourth it

Output-

  • First item
  • Second item
  • Third item
  • Fourth item
  • First item
  • Second item
  • Third item
  • Fourth item
  • First item
  • Second item
  • Third item
  • Fourth item

Code Blocks

Enclose any code in (```) signs

eg-
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

----------------

Footnotes

Here's a simple footnote,[^1] and here's a longer one.[^bignote]

[^1]: This is the first footnote.

[^bignote]: Here's one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    `{ my code }`

    Add as many paragraphs as you like.

Output- Here's a simple footnote,[^1] and here's a longer one.[^bignote]

[^1]: This is the first footnote.

[^bignote]: Here's one with multiple paragraphs and code.

Indent paragraphs to include them in the footnote.

`{ my code }`

Add as many paragraphs as you like.

Heading IDs

### My Great Heading {#custom-id}

Linking to Heading IDs

[Heading IDs]
(#heading-ids)

----------------

Definition Lists

First Term
: This is the definition of the first term.

Second Term
: This is one definition of the second term.
: This is another definition of the second term.

Output-

First Term : This is the definition of the first term.

Second Term : This is one definition of the second term.

: This is another definition of the second term.


Task Lists

- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

Output-

  • [x] Write the press release
  • [ ] Update the website
  • [ ] Contact the media

---------------

Images

![Markdown Logo](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/1280px-Markdown-mark.svg.png)

Output-

Markdown Logo

---------------

Tables

| Syntax      | Description |
| ----------- | ----------- |
| Header      | Title       |
| Paragraph   | Text        |

Output-

SyntaxDescription
HeaderTitle
ParagraphText
Edidiong Asikpo's photo

Learned some new markdown formats from this article. Thanks for sharing Vedant Chainani.

Maxi Contieri's photo

Great Article!

I recently discover markdown and use it all time. Hopefully they will standardize embedding links. Every site has its own rules

Andrew Baisden's photo

Clean and concise I like it.