Markdown Language: Syntax Cheat Sheet with Examples

Roman Ryumin, Web Developer

Markdown is a lightweight markup language used to format text. It was created to make conversion to HTML simple and fast. In this cheat sheet, we cover the key Markdown elements.

Headings

Use the # symbol to create headings. The number of # symbols sets the heading level from 1 to 6.

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

Paragraphs

Just write text and it becomes a paragraph. Use a blank line to separate paragraphs.

This is the first paragraph.

This is the second paragraph.

Lists

Numbered lists

Use numbers followed by a period.

1. First item
2. Second item
3. Third item

Bulleted lists

Use -, *, or +.

- First item
- Second item
- Third item
* First item
* Second item
* Third item
+ First item
+ Second item
+ Third item

Nested lists

Use indentation (usually two spaces or one tab).

1. First item
   - Nested item
   - Nested item
2. Second item
   1. Nested item
   2. Nested item

Links

Inline links

Use square brackets for the link text and parentheses for the URL.

[Sample link](https://example.com)

Links with titles

You can add a tooltip title that appears on hover.

[Sample link with title](https://example.com "Link title")

Images

Image syntax is similar to links, but with a leading exclamation mark.

![Image alt text](https://example.com/image.jpg)

Text emphasis

Bold text

Use double asterisks ** or double underscores __.

**Bold text**
__Bold text__

Italic text

Use single asterisks * or a single underscore _.

*Italic text*
_Italic text_

Strikethrough

Use double tildes ~~.

~~Strikethrough text~~

Code blocks

Inline code

Use backticks `.

`inline code`

Multi-line code blocks

Use triple backticks.

```markdown

multi-line code block

```

Quotes

Use the > symbol.

> This is a quote.
>
> It can span multiple lines.

Horizontal rules

Use three or more dashes ---, asterisks ***, or underscores ___.

---
***
___

Tables

Use dashes for headers and vertical bars to separate columns.

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |
| Cell 3   | Cell 4   |

Conclusion

Markdown is a simple and effective way to format text that can be easily converted to HTML. With this cheat sheet, you can quickly master the core syntax and use it in your projects.

More Articles

Image Optimization for Google PageSpeed

A practical script to optimize images according to Google PageSpeed recommendations (for VPS/VDS).

Read

How to Build a Webasyst Shop-Script Store (2025)

Choose a design theme, set up the store, add products, and launch your promotion.

Read

Shall we discuss your project?

Fill out the form and get a free consultation. We will review your goals and the best way to achieve them.

Address
Saint Petersburg
Telezhnaya 3A, Office 5

We use cookies to improve the site. By continuing to use the site, you agree to the cookie policy.