DEV Community

Manish
Manish

Posted on

Markdown Tutorial

This tutorial teaches you the basic of Markdown language. Markdown is a lightweight markup language which is used to add formatting to plain text. Let's get started.

Heading

You can add a heading in Markdown by adding # in front of the heading you want to put. For E.g:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

You can out a maximum of 6 headings in a Markdown.

Paragraphs

For paragraphs you need to use a blank line to create a new line and add the text in there. For e.g.:

This is the first paragraph.

This is the second paragraph.

This is the third paragraph.

You can add as many as paragraph you want in Markdown. It is the same as we do in plain text.

Line Breaks

In Markdown to add a line break you need to type two to three spaces and then press return. Here is the example:

This is the first line.

Now you have the second line.

You can add as many as line you want in Markdown.

Emphasis

Bold

To bold a text you need to put the text in Double Asterisk Bold

Italic

To italic a text you need to put the text in Single Asterisk i.e. Italic

Bold & Italic

Markdown provides a functionality where you can Bold & Italic the text at the same time. See the below example for further reference.

Bold & Italic.

Block quotes

A block quotation (also known as a long quotation or extract) is a quotation in a written document that is set off from the main text as a paragraph.

So in order to use a text as Block Quote, you need to use the angular bracket '>' in front of the text you want to set as a block quote. For example:

This is a first line in Block Quote

This is a second line in a Block Quote.

Nested Block quotes

You can use a block quote inside a block quote. For e.g.:

This is a single block quote.

 This is a nested block quote.

The syntax for this is:

>This is a single block quote.
>
>      This is a nested block quote.
Enter fullscreen mode Exit fullscreen mode

This is the end of the Part 1 of the two series of our Markdown Tutorial.

Top comments (0)