Markdown cheatsheet: Brief detail with syntex

Markdown cheatsheet: Brief detail with syntex

What is markdown?

Similar to HTML, Markdown is a markup language. We can use it to add formatting elements to plain text documents.

How to create a markdown file?

to create a markdown file we just have to give the .md extension to the file.

Use of markdown file

Markdown allows us to write documents that are easy to read and write. It is really useful for developers as it contains all the information regarding the projects and also some instructions like how to install node packages and other dependencies. It's most popular use in GitHub while we create our repository at that time we include the readme.md file.

Syntax of Markdown

1. Heading

We can create a heading by using the # symbol followed by single space before writing the heading. We can create heading up to 6. For heading 2 we use ## and it will go for heading 6.

# Heading 1
## Heading 2
### Heading 3

Output:

Heading 1

Heading 2

Heading 3

2. Bold and italic

For bold text, we use two asterisks or underscores after and before the text that we want to bold. Similar for italic we use single * or single _ around the text.

this is **Bold** 
this is____Bold2____
*Italic1* 
_Italic2_

Output:

this is Bold

this isBold2

Italic1

Italic2

3. Strike

For strikethrough, we use a double tilde sign before and after the text.

~~599~~ 399 offer price

output:

599 399 offer price

4. List

There are 2 types of list we are using.

1.Ordered list For ordered list we use numbers and after space then we start writing. For a nested list we have to enter and tab for writing inside that list.

Ordered list

1. One
2. Two
   1. one
   2. two
   3. three

output:

Ordered list

  1. One
  2. Two
    1. one
    2. two
    3. three

Unordered list: for unordered list we use dash sign (-) and space. we also use single * instead of - sign.

Unordered list:
- vegetables
- fruits
  - mango
  * banana

output:

Unordered list:

  • vegetables
  • fruits
    • mango
    • banana

To create any link we use a combination of bracket and parentheses. In bracket we use the name of link and inside the parentheses we type the url link of particular webpage.

[Click me!!](https://www.google.co.in/ )

output:

Click me!!

6. Inserting Image:

Syntex of inserting an image is similar to inserting the link. only we add to exclamation mark ! before the square brackets.

![LCO](https://learncodeonline.in/mascot.png)

output:

LCO

8. block quotes

To create a blockquote, we can use the greater than sign (>). for nested block we use double >> sign.

> This is a blockquote

output:

This is a blockquote

Conclusion:

I hope everything is clear about the basics of markdown. Once yor start practicing and use it on your project file then you get more idea about it. In case you want to know more about the markdown syntax then you must refer extended syntax of it's official website.