Skip to content

Guide

Markdown basics — a 10-minute cheat sheet

A handful of symbols like #, * and - is all it takes to write formatted documents. The Markdown syntax you will use every day, with examples.

1 min read

On this page
  1. 1Headings
  2. 2Paragraphs and line breaks
  3. 3Emphasis
  4. 4Lists
  5. 5Links and images
  6. 6Quotes
  7. 7Code blocks
  8. 8Tables
  9. 9Horizontal rules
  10. 10Converting Markdown to other formats
  11. 11Common mistakes
  12. 12Summary

Markdown is a way of formatting text with a few ordinary characters. You can write it in any text editor, and it reads naturally even before it’s rendered. GitHub, Obsidian, Notion, many blogging platforms and documentation sites all use it.

Headings

Start a line with # followed by a space. More # means a smaller heading.

# Biggest heading
## Second-level heading
### Third-level heading

Paragraphs and line breaks

Separate paragraphs with a blank line. Lines without a blank line between them join into one paragraph. To break a line inside a paragraph, end it with two spaces.

Emphasis

**bold**   *italic*   ~~strikethrough~~   `code`

Result: bold, italic, strikethrough, code

Lists

- Apples
- Bananas
  - Indent sub-items by two or more spaces

1. First
2. Second
[FreeConvertter](https://freeconvertter.com)
![Description of the picture](images/logo.png)

An image is a link with ! in front; the parentheses hold the image’s path or address.

Quotes

> A quoted sentence.

Code blocks

Wrap code in three backticks. Everything inside is shown exactly as typed.

```
npm install
npm run dev
```

Tables

| Item | Price |
| --- | ---: |
| Apples | 1.20 |
| Bananas | 0.80 |

The --- row separates the header from the body; a colon on the right, ---:, right-aligns the column.

Horizontal rules

A line containing only --- (after a blank line) draws a divider.

Converting Markdown to other formats

You want to… Converter
View or share it as a web page Markdown to HTML
Hand in a Word document Markdown to DOCX
Read or publish it as an e-book Markdown to EPUB
Keep just the text, without symbols Markdown to TXT

Write course notes in Markdown, convert them to EPUB, and your # headings become the book’s chapters.

Common mistakes

  • Forgetting the space after # — #Heading isn’t a heading.
  • No blank line before a list, so it sticks to the previous paragraph.
  • Table rows with different numbers of cells.

Summary

# for headings, ** for bold, - for lists and []() for links cover most documents. To move existing Word files into Markdown, see How to convert Word documents to Markdown.

Tools used in this guide

Related guides