Markdown Cheat Sheet

Markdown formats plain text with a few symbols: # for headings, **two asterisks** for bold, [text](address) for links, - for bullet lists and three backticks for code blocks. Each example below can be edited, and the preview next to it updates as you type, so you can test a syntax before you use it.

The five you will use most
You wantType
Heading## Section name
Bold**important**
Link[label](https://example.com)
Bullet list- item
New linetwo spaces at the end of a line

Updated

Eighteen live examples covering everything from headings to footnotes and GitHub alerts, a table of where GitHub and standard CommonMark differ, a README template and a full editor at the bottom of the page.

Syntax at a glance

Markdown syntax and where it works
ElementMarkdownWorks in
Headings# Page titleEverywhere
Bold and italicThis is **bold**, this is *italic*,Everywhere
StrikethroughThe price was ~~$40~~ $30.GitHub and most apps
Line breaksFirst line with two spaces at the end Everywhere
Links[We.Inc tools](https://we.inc/tools)Everywhere
Reference linksRead the [guide][1] and the [tools][tools].Everywhere
Images![We.Inc logo](/logo.svg)Everywhere
Lists- ApplesEverywhere
Checkboxes (task lists)- [x] Write the draftGitHub and most apps
Blockquotes> Good design is as little design as possible.Everywhere
Inline codeRun `npm install` and open `index.html`.Everywhere
Code blocks```jsEverywhere
Tables| Plan | Price | Sites |GitHub and most apps
Horizontal ruleAbove the lineEverywhere
FootnotesMarkdown was created in 2004.[^1]GitHub and most apps
Escaping characters\*not italic\* and 1\. not a listEverywhere
Automatic linksVisit https://we.inc or www.example.comGitHub and most apps
Alerts (callouts)> [!NOTE]GitHub only

Headings

# Page title
## Section
### Subsection

One to six # signs, then a space. Use a single # heading per document.

Bold and italic

This is **bold**, this is *italic*,
and this is ***both***.

Underscores (__bold__, _italic_) also work, but not in the middle of a word.

Strikethrough

The price was ~~$40~~ $30.

Two tildes on each side. Part of GitHub Flavored Markdown, not core CommonMark.

Line breaks

First line with two spaces at the end  
Second line\
Third line after a backslash

A blank line starts a new paragraph.

A single Enter does not break the line. End it with two spaces or a backslash, or leave a blank line for a new paragraph.

Links

[We.Inc tools](https://we.inc/tools)
[Link with a title](https://we.inc "Hover text")
<https://we.inc>

Text in square brackets, address in round brackets. Angle brackets make a bare address clickable.

Reference links

Read the [guide][1] and the [tools][tools].

[1]: https://we.inc/guides
[tools]: https://we.inc/tools

Keeps long addresses out of the text. The definitions can go anywhere and are not shown.

Images

![We.Inc logo](/logo.svg)

Like a link with ! in front. The text in brackets is the alt text that screen readers read out.

Lists

- Apples
- Pears
  - Conference
  - Comice

1. Preheat the oven
2. Mix the dry ingredients
3. Bake for 25 minutes

Use -, * or + for bullets and 1. for numbers. Indent by two to four spaces to nest.

Checkboxes (task lists)

- [x] Write the draft
- [ ] Add screenshots
- [ ] Publish

A space between the brackets is unchecked; an x is checked. On GitHub you can tick them in issues.

Blockquotes

> Good design is as little design as possible.
>
> Second paragraph of the quote.

Start each line with >. A line with only > keeps the paragraphs in one quote.

Inline code

Run `npm install` and open `index.html`.

Backticks keep text exactly as typed. To show a backtick, wrap with two: `` a`b ``.

Code blocks

```js
const total = items.reduce((sum, i) => sum + i.price, 0);
```

Three backticks before and after. The word after the opening fence names the language for highlighting.

Tables

| Plan | Price | Sites |
| :--- | ---: | :---: |
| Free | $0 | 1 |
| Pro | $20 | 5 |

Pipes separate columns; the dashes row is required. Colons set alignment: left, right or centre.

Horizontal rule

Above the line

---

Below the line

Three or more dashes, asterisks or underscores on their own line. Leave blank lines around dashes so they are not read as a heading underline.

Footnotes

Markdown was created in 2004.[^1]

[^1]: By John Gruber, with help from Aaron Swartz.

The note is gathered at the bottom of the document with a link back.

Escaping characters

\*not italic\* and 1\. not a list

A backslash before * _ # [ ] ` and similar characters shows them as plain text.

Automatic links

Visit https://we.inc or www.example.com

GitHub turns plain addresses into links. Strict CommonMark needs angle brackets.

Alerts (callouts)

> [!NOTE]
> Useful information readers should know.

> [!WARNING]
> Something that needs attention.

GitHub shows these as coloured boxes; other apps show a plain quote, as the preview here does.

GitHub vs CommonMark

Where GitHub Flavored Markdown differs from CommonMark
FeatureCommonMarkGitHub (GFM)
TablesNot supportedSupported
Task list checkboxesNot supportedSupported, clickable in issues and pull requests
StrikethroughNot supported~~text~~
Bare URLs become linksOnly inside <angle brackets>Yes, for http, https and www addresses
FootnotesNot supportedSupported
Alerts like > [!NOTE]Plain blockquoteStyled callout box
Raw HTMLAllowedAllowed, but scripts, styles and some tags are removed
Mentions and issue linksPlain text@user and #123 become links

README template

# Project name

One sentence on what this project does and who it is for.

## Features

- First thing it does well
- Second thing it does well

## Getting started

```bash
git clone https://github.com/you/project.git
cd project
npm install
npm run dev
```

## Usage

Show the smallest useful example here.

## Contributing

Pull requests are welcome. Open an issue first to discuss larger changes.

## License

MIT. See [LICENSE](LICENSE).

Why Markdown looks different in different apps

The original Markdown description left many edge cases open, such as how far a nested list must be indented or whether a line break needs two spaces. Each app made its own choices. CommonMark fixed those rules in a specification, and most modern tools now follow it, then add their own extras on top.

That is why the support label matters. Headings, emphasis, links, lists, quotes and code work everywhere. Tables, checkboxes, strikethrough and footnotes come from GitHub's extensions and work in most, but not all, places. Alerts are GitHub's own.

Writing a good README

A README is the front page of a project. Open with one sentence on what it does and who it is for, then show how to install and run it in a copyable code block, then the smallest useful example. Put long reference material in separate files and link to them.

The template below follows that order. Load it into the editor, replace the placeholder text and copy the result into README.md.

How it works

  1. Find the element you need. The label under each example says whether it works everywhere, in GitHub and most apps, or on GitHub only.
  2. Edit the Markdown in the left box. The preview on the right renders it as you type.
  3. Use Reset to restore the original example and Copy to take the Markdown with you.
  4. For longer writing, use the full editor at the bottom, or load the README template into it.

Tips

Frequently asked questions

How do I make a line break in Markdown?

End the line with two spaces or a backslash, then press Enter. A plain Enter is treated as a space and the lines join up. For a new paragraph instead of a line break, leave one blank line.

How do I add a checkbox in Markdown?

Start a list item with - [ ] for an empty box or - [x] for a ticked one. Task lists are part of GitHub Flavored Markdown, so they work on GitHub, GitLab and most note apps, but not in strict CommonMark.

How do I make a table?

Write the header row with pipes between the columns, then a row of dashes, then one line per row. The columns do not have to line up in the source. Add colons to the dashes row to align a column left, right or centre.

What is the difference between Markdown, CommonMark and GFM?

Markdown is the original 2004 syntax, which left many cases undefined. CommonMark is a precise specification of that core syntax. GitHub Flavored Markdown is CommonMark plus tables, task lists, strikethrough, automatic links and footnotes, and it is what most developer tools follow.

Can I use HTML inside Markdown?

Most renderers allow it, so details and summary tags or a centred image are common in READMEs. GitHub removes scripts, styles and some attributes for safety. The previews on this page do not render raw HTML, so they show it as text.

Related: Markdown table generator, HTML to Markdown converter, Text to HTML converter, Regex cheat sheet, All free tools.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap