Skip to main content

Command Palette

Search for a command to run...

Syntax of Markdown

Published
3 min read

the markdown sheet provides a quick overview of all the markdown syntax elements. it can not cover every edge case, so if you need more information about any of these elements, you refer to basic syntax of markdown.

Basic syntax

Heading

  • To create a heading tag, in front of any word you add the sign of Hash(#), if you want to see a big heading , you want to put one hash before the word. and you put the double hash in front of the word or phase, you get smaller heading then previous heading. same as to three, four, five and six hash. The heading gets smaller as you increase the hash. add two hash without spaces around the letters. (e.g. ### my heading)
# heading1
## heading2
### heading3
#### heading4
##### heading5
###### heading6

Result:

heading1

heading2

heading3

heading4

heading5
heading6

Bold

  • for bold any word or any phase use the two asterisk sign before and after the word and second Another way to bold the word use the double underscores before and after the word. add two underscores or underscores without spaces around the letters.
    Markdown extension is **md**
    This is __markdown__
    
    Result:

Markdown extension is md

This is markdown

Italic

  • To create the Italic word use the one asterisk sign before and after the word and another way is one underscores before and after the word. add one asterisk or underscores without spaces around the letters.
    this is *hashnode*
    this is _hashnode_
    
    Result:

this is hashnode

this is hashnode

Paragraph

To create paragraphs, use a blank line to separate one or more lines of text. there is no special syntax for the paragraphs. press the tab and direct write the paragraph.

write here 

    this is a first para

List

you can organize items into ordered list and unordered list.

Ordered list

To create an ordered list, add the items with number followed by the list. even if you give no in the list order, output comes from the one number or in ordered. and you also give the sub list to the main list.

1. item1
2. item2
3. item3
4. item4

or

1. item1
1. item2
1. item3
1. item4

or

1. item11
9. item12
10. item13
7. item14

Result:

  1. item1
  2. item2
  3. item3
  4. item4

or

  1. item1
  2. item2
  3. item3
  4. item4

or

  1. item11
  2. item12
  3. item13
  4. item14

Sub items

1. item1
2. item2
    1. subpara1
    2. subpara2
    3. subpara3
3. item3
4. item4

Result:

  1. item1
  2. item2
    1. subpara1
    2. subpara2
    3. subpara3
  3. item3
  4. item4

    Unordered list

    To create an Unordered list, add the dash sign before the items and create the unordered list. you nested another list.
- item11
- item12
- item13
- item14

Result:

  • item11
  • item12
  • item13
  • item14

Blockquotes inside the unordered list

- this is the first item
- this is the second item
    > blockquotes inside the second item
- this is the another item

Result:

  • this is the first item
  • this is the second item

    blockquotes inside the second item

  • this is the another item

To create a link , write the link text in brackets (e.g. [google]) and write the URL in parentheses(e.g. (https://google.com)).

[Google](https://google.com )

Result: Google

Horizontal rules

To create the horizontal rules use the three asterisks (*).

***
HELLO
***

Result:


HELLO


Code

To write a code three backticks sign(```) will be use . inside three backticks before and after the code.

Images

To put the images we have to use ! square braces And parentheses. in the square braces write the name of the link and in the parentheses write the URL.

![Picture](https://images.unsplash.com/photo-1658510175674-d961bd424686?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=464&q=80)

Result:

Picture