DEV Community

Cover image for Markdown
NIKHIL GAUTAM
NIKHIL GAUTAM

Posted on • Updated on

Markdown

Markdown

What is Markdown?

  • Markdown is a lightweight markup language for creating formatted text using a plain-text editor. and is kinda similar to HTML.

Why Should I learn this?

  • After having a good understanding of Md you can build a good read me.md file for github,DEV community ..

Headings

Below are 6 heading variations

Heading 1 [#]

Heading 2 [##]

Heading 3 [###]

Heading 4 [####]

Heading 5 [#####]
Heading 6 [######]

Horizontal Rule

This is a horizontal rule

use "[---]"

It separates content


Text formatting

Paragraph line spacing is important.

use either * or _ at the begining or at the end.

italic text and more italic text

_italic text_ and _more italic text_     

Enter fullscreen mode Exit fullscreen mode

bold text and more bold text

**bold text** and **more bold text**

Enter fullscreen mode Exit fullscreen mode

*bold and italic text

**\*bold and italic text**

Enter fullscreen mode Exit fullscreen mode

mix and match

**mix _and_ match**

Enter fullscreen mode Exit fullscreen mode

strikethrough text

~~nikhil~~
Enter fullscreen mode Exit fullscreen mode

nikhil


List

Ordered List

  1. Item 1
  2. Item 2
  3. Item 3
  4. Item 3
  5. Item 3
  6. Item 3

Markdown automatically take care of the order of list

Unordered List

  • Item
  • Item
  • Item

Code formatting

Inline: Use JavaScript map()

`map()`
Enter fullscreen mode Exit fullscreen mode

we can highlight a specific part of code by using backticks

Fenced code block

const sum = (a, b) => a + b;
sum(2, 2);
Enter fullscreen mode Exit fullscreen mode

we can mention the programming language in code block by simply mentioning the programming language after backtick..
for
JavaScript (js)
Python (py)
typescript (ts)

Blockquote

This is a blockquote

>
Enter fullscreen mode Exit fullscreen mode

Nested blockquote

this is nested blockquote.

Some text

> this is nested blockquote.
>
> > Some text
Enter fullscreen mode Exit fullscreen mode

Task List

  • [x] Task 1
  • [x] Task 2
  • [] Task 3
  • [] Task 4

Callouts

💡 Tip Here's an important tip to remember!

> :bulb: **Tip** Here's an important tip to remember!
Enter fullscreen mode Exit fullscreen mode

Links

Follow me on Linkedin

Twitter

Nikhil Gautam

for more Markdown

Top comments (0)