Markdown Cheat Sheet for every Developer

What is Markdown?

Markdown is a light-weight markup language used for formatting text.

In this cheat sheet I have described all the necessary syntax required to write beautiful text.

The extension of markdown file is md. The name is user-defined, but if you markdown is for GitHub then it should be readme.

Headings

For the heading #(pound) symbol is used. The # symbol and the heading text is separated by a <space>.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5

Blog (1) Type Role Action Delete/Leave Karan's blog karanchauhan.hashnode.dev

Heading 6

Bold

To make a text bold. Double __ (underscore) or ** is used on both side of the text.

__ This is bold__
**Bold**

Output

This is bold

Bold

Italic

To make a text italic. Single _ (underscore) or * is used on both side of the text.

_ This is bold_
*Bold*

Output

This is bold

Bold

Strikethrough

Double ~~ (tilde) is used on both side of the text.

~~999~~ 699

Output

strikethrough_markdown.png

Code

Triple ``` (backtick) is used on both side of the code.

code_snippet.png

Output

console.log("Becoming JS Developer")

For inline code single ` (backtick) is used around the code.

List

Unordered List

A - followed by <space> for an unordered list. You can nest the list as much as you need.

- List 1
- List 2
  - List aBlockquote
  - List b

Output

  • List 1
  • List 2
    • List a
    • List b

Ordered List

A 1. followed by <space> for an unordered list. You can nest the list as much as you need. After 1. 2. 3. the list goes so on. If by any change, you made a mistake in the list counting, your dont need to worry, markdown will take care of it.

1. List 1
1. List 2
  1. List a
  1. List b

Output

  1. List 1
  2. List 2
    1. List a
    2. List b

[Link](url, "alt text") - Here Link is the text that will be visible, alt text is the text that will be visible when you hover on the Link

[Link](url, "alt text")

Output

Google

Image

![alt-text-for-image](img-url) - Here alt-text-for-image appears when the image fails to load. Any local image url or online image url can be used in the place of img-url

Output

LCO

Blockquote

> symbol is used followed by a <space>.

> This is a Blockquote

Output

This is a Blockquote

Horizontal Lines

You can add a horizontal line by using triple - _ or *

___
---
***

Output




Table

Table can be created by using the vertical slash ( | ).

| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |

Output

SyntaxDescription
HeaderTitle
ParagraphText

Hope this post can help you in making beautiful markdowns. Further you can add badges in you markdown to enhance its beauty. You can use Shields.io to generate badges.