Learn Markdown the easiest way

Before Learning about Markdown lets take one step back and try to know why Markdown even exists

What is Markdown ??

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. The most common place where you can see or may used before is readme.md file on GitHub

Why Markdown ??

Markdown is platform-independent. You can create Markdown-formatted text on any device running any operating system.

Markdown is everywhere , sites like GitHub uses markdown extensively in there README files and i almost forgot Hashnode also uses it.

you can use markdown almost everywhere like for technical documentation, websites, documents, notes etc.

Let's get started with tags:

So the first tags about which you need to know is Heading

Heading Tag

In HTML we use h1 to h6 for headings but in markdown we use '#' symbols for the headings. As there are 6 heading tags in HTML so as in .md

markUp headingsmarkDown headings
h1# h1
h2## h2
h3### h3
h4#### h4
h5##### h5
h6###### h6

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Text

In markdown there a 3 ways of styling a text

  1. Bold
  2. italic
  3. cross-out

Bold : Use double estric (BOLD) or you can use ( __ ) two underscore instead of double estric

Italic : Use Single estric (italic) , or single underscore( _ ) instead of dingle estric

Crossed-out : In order to create a crossed-out text, use the tilde in Markdown twice in a row, followed by the respective text and then another two tildes. ~~This text is struckthrough.

Links

Markdown syntax for a hyperlink is square brackets followed by parentheses. The square brackets hold the text, the parentheses hold the link.

Connect with me on twitter

syntax:

[]: in square bracket put some text

() : in here put link

[text] (link)

Images

just an exclamation mark to the front

syntax

![nikhil](link of the picture)

niikhil

Lists

Probable one of the most used tags in md

there are 3 types of list

• ordered list Order List

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

the problem with that is when you change order you have to change numbers by yourself which is very cumbersome task

to do so we use this

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

automatically arrange itself when we change or shift something

• unordered

list : use "-" or "*" before the list item and space

  • item1

  • item1

  • item1

  • item1

if you want list inside list -item -subitem 1 -subitem 2 -subitem 3 -item2 -item3 o task list

  • [] item 1 empty checklist

if you want a filled checklist -[x] item 2 (checked)

  • [x] item 1 filled checklist

Table

Tables are great for tabular data.

The first line is heading

1: A pipe character (|) separates the individual columns in a table.

2: Hyphens (-) act as a delimiter row to separate the header from the body.

3: A colon (:) aligns cell contents.

Column 1Column 2Column 3
row 1, Column 1row 1, Column 2row 1, Column 3
row 2, Column 1row 2, Column 2row 2, Column 3
row 3, Column 1row 3, Column 2row 3, Column 3

second row is all about alignment 1st is text of the heading left 2nd is text of the heading is center 3re is text of the heading is right

Quote

This is the line is which is going to quote ">" this is the line is which is going to quote code

Code Snippet

This is the most fun and important part inline single line code hi i am const name = "niikhil" hi i am const name = "niikhil" this is cumbersome to read so we use block level console.log(name)

const name = 'nikhil';
console.log(name);

we can use diff

      diff
            -let name = "nikhil"
            +let name = "nik"
            console.log(name)

      diff
            -let name = "nikhil"
            +let name = "nik"
            console.log(name)

Thanks for Reading
I hope it will help you in getting started