Cheat Sheets Development

Markdown Syntax Cheat Sheet

Markdown syntax for headings, emphasis, links, images, lists, quotes, code and tables, with tips and the differences between Markdown flavours.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page
On this page

Markdown is a plain-text way to write formatted text. A few symbols turn into headings, lists, links and code, and the result converts to HTML. It is used by GitHub, README files, documentation sites, forums and note apps. Preview yours in the Markdown Previewer. Every row below was rendered with a Markdown processor to confirm it works.

The basics

You type You get
# Heading 1<br>## Heading 2 Headings: one to six # signs
bold Bold
italic Italic
text Link
alt text Image (the text in brackets is the alt text)
- item<br>- item Bulleted list (-, * or +)
1. first<br>2. second Numbered list
> quoted Block quote
`code` Inline code
```<br>code block<br>``` Fenced code block (add a language after the first fence for highlighting)
--- Horizontal rule
| a | b |<br>|---|---|<br>| 1 | 2 | Table (an extension in some processors; supported by most)

Tips

  • Leave a blank line between paragraphs, before lists and around code blocks.
  • End a line with two spaces (or a backslash in some processors) for a line break without a new paragraph.
  • Indent a nested list item by two to four spaces.
  • Escape a symbol with a backslash to show it literally, as in \*not italic\*.
  • Raw HTML usually works inside Markdown, but some sites strip it for safety.

Flavours differ

Original Markdown is small. Most platforms add extensions: GitHub Flavored Markdown adds tables, task lists (- [ ] todo), strikethrough (~~text~~) and autolinks; others add footnotes, definition lists or math. If something does not render, check which flavour the site uses.

Converting

Turn Markdown into HTML with any processor, and the other way round with the HTML to Markdown Converter or the CSV to Markdown Table for tables.

Try these tools

See also

  • Glossary Markdown
    Markdown is a lightweight way to write formatted text using plain-text symbols, such as # for headings and ** for bold.
AdSense Placeholder
Slot: footer_leaderboard