DEV Community

loading...
Cover image for Markdown Cheat Sheet

Markdown Cheat Sheet

ankushsinghgandhi profile image Ankush Singh Gandhi Updated on ・2 min read

At some stage of careers, developers and students will encounter Markdown files, they are used in platforms such as GitHub or Dev. Markdown files use the .md file extension and will contain specific syntax used to construct the file. The majority of CMS (Content Management System) uses markdown, so to start using it is as simple as creating and writing in a plain text file.

Markdown files is a great way because it helps to create beautiful markup without having to build it with code. They are commonly used inside git readme files as documentation but have also grown to be extremely popular on blogging platforms such as dev.

here is the cheat sheet 👇

Headings🔽

Headings will be represented by adding a # symbol before the title. The number of # symbols signifies the number of heading from h1 to h6. so by adding a single # it will represent a h1 tag. increasing the no. of # will increase the no. of heading.

# Heading 1 <h1>
## Heading 2 <h2> 
### Heading 3 <h3>
#### Heading 4 <h4>
##### Heading 5 <h5>
###### Heading 6 <h6>
Enter fullscreen mode Exit fullscreen mode

Paragraphs🔽

There is no specific syntax used when writing paragraphs in markdown syntax.

this is a paragraph
Enter fullscreen mode Exit fullscreen mode

Bold Text🔽

there are many ways to write bold text.

**Bold text** 

__Bold text__ 
Enter fullscreen mode Exit fullscreen mode

Italic Text🔽

similarly to Bold we can achieve this in many ways.

*Italic text* 

_Italic text_ 
Enter fullscreen mode Exit fullscreen mode

Lists🔽

Lists have varying syntax.

To create ordered lists, simply add items with numbers followed by a period. Each list item will need to be on a new line.

1. Ordered list item #1
2. Ordered list item #2
3. Ordered list item #3
Enter fullscreen mode Exit fullscreen mode

To create an unordered list, simply add either a dash (-), asterisk (*), or plus signs (+) in front of your line items.

- Unordered list item #1
- Unordered list item #2
- Unordered list item #3
Enter fullscreen mode Exit fullscreen mode

Links🔽

To create a link, enclose the text you wish to link with square brackets followed by the link in parentheses.

[example.com](https://example.com/)
Enter fullscreen mode Exit fullscreen mode

example.com

Images🔽

Images have a similar syntax to links, except they have an exclamation mark in front of the square brackets, followed by the alt text inside the square brackets and the path to the image in parentheses.

![Alt text](/image-1.jpg)
Enter fullscreen mode Exit fullscreen mode

Block Quotes🔽

A block quote can be created by adding a right-facing chevron > in front of a paragraph.

> I am a block quote
Enter fullscreen mode Exit fullscreen mode

I am a block quote

Horizontal rules🔽

There are several ways to add a horizontal rule to a document by either adding three or more asterisks (***), dashes or underscores.

---

_________________

***
Enter fullscreen mode Exit fullscreen mode

Table🔽

Tables are created using pipes (|) and dashes (-), with colons (:) used to align cell contents.

Column 1 | Column 2 | Column 3
--- | --- | ---
one | two | three
four | five | six
Enter fullscreen mode Exit fullscreen mode

Output

Column 1 Column 2 Column 3
one two three
four five six

My other Blogs

Discussion (2)

pic
Editor guide
Collapse
rduttshukla profile image
RIshi Dutt Shukla

Too much useful! I keep coming back again and again for referring 👏

Collapse
ankushsinghgandhi profile image