Saved

Press the star next to a tool's name to save it.

All my tools

Markdown Cheat Sheet

This markdown cheat sheet lists the syntax for headings, emphasis, lists, links, images, code and block quotes, plus the extras GitHub adds. Search it, filter by topic or print it.

Restored your last values ·

Your search stays in your browser. Nothing is uploaded.

Commands

–

No commands match that search.

Recent results

This markdown cheat sheet follows the CommonMark specification for the core syntax and GitHub's writing guide for its extras. [1] [2] Markdown is plain text with a few marks that turn into formatting, so a document stays readable even before it is converted to HTML.

How to use the markdown cheat sheet

  1. Type in the search box to filter by any word in a name, a command or its note.
  2. Choose a topic to see one group instead of the whole list.
  3. Read the command in the right-hand column and its meaning on the left.
  4. Press Print for a clean copy of whatever is shown.

What is in each topic

The markdown cheat sheet is split into 5 topics. The table shows how many entries each topic holds and which ones they are, so you can jump straight to the right group with the topic box.

TopicEntriesWhat it covers
Headings and text7heading level 1; heading level 2; heading underline style; emphasis; strong emphasis; line break; horizontal rule
Lists3bulleted list; numbered list; nested item
Links and images4inline link; link with a title; reference link; image
Code and quotes3inline code; code block; block quote
GitHub extras2task list; strikethrough

Headings, emphasis and breaks

A heading starts with one to six hash characters followed by a space, so ## Section is a level-two heading. A line of equals signs under text makes a level-one heading and a line of hyphens a level-two one. [1] Wrap text in single asterisks for emphasis; the specification shows that form, and double asterisks for strong emphasis are widely supported. [1] On GitHub, double asterisks make bold text and ~~text~~ crosses text out. [2]

A thematic break is three or more hyphens, underscores or asterisks on a line, and a hard line break is a backslash at the end of a line or two trailing spaces. [1]

A bulleted item starts with a hyphen, plus or asterisk followed by a space. An ordered item starts with digits followed by a full stop or a closing bracket. [1] To nest, indent the child item so it lines up with the parent's text. [2]

A link is [text](address) and an image is the same with an exclamation mark in front: ![alt text](image-url). [2] A reference-style link puts the address in a definition elsewhere in the form [label]: /url "optional title". [1] Always write alt text for images.

Code, quotes and GitHub extras

Wrap inline code in backticks. A fenced code block opens with three or more backticks or tildes, an optional language name, the code, then a closing fence at least as long. [1] A block quote starts each line with a greater-than sign. [1]

GitHub adds task lists, written - [x] for done and - [ ] for open items. [2] The GitHub page does not explain table syntax, so tables are not covered here. Features beyond the core can differ between sites, so preview your text where it will be published.

Who this page helps

Developers use a cheat sheet to look up a command they have not typed for a while, to learn the names of the options and to compare similar commands. Beginners can read down a topic to see what is possible, and experienced users can search for the one flag they forgot.

Tips for getting the most from the markdown cheat sheet

  • Leave a blank line before and after lists, headings and code blocks, so renderers read them correctly.
  • Preview your text where it will be published, since extras differ between sites.
  • Write alt text for every image and a clear name for every link.

Common mistakes

Most problems come from running a command in the wrong place or with the wrong target. Read a command before you press Enter, replace every placeholder with your own value, and try destructive commands on a test copy first. When a command behaves differently from the note, check the version you have installed and the official documentation.

Where the entries come from

Each command was checked against the documentation listed below this article. Where a command is standard but is not shown on the page we read, the article says it is our own working. Options and defaults change between releases, so run the help command for the version you have installed before you rely on a flag.

What this page does not do

It lists the commands most people need and does not try to cover every option. For the complete syntax, error messages and advanced features, open the official documentation linked in the sources, and keep it beside the cheat sheet while you learn.

Printing and checking

Filter by topic before you print if you only need one section, and the printed page will be shorter. The notes are short on purpose, so keep your textbook or the official documentation open for the full detail and for anything that changes between versions.

What next

Use this often? Add Markdown Che to your Home screen.

Frequently asked questions

What does this markdown cheat sheet cover?

Headings, emphasis, line breaks, lists, links, images, inline and fenced code, block quotes, and GitHub strikethrough and task lists.

How do I make a link in Markdown?

Put the link text in square brackets and the address in round brackets straight after it, like [text](https://example.com).

How do I write a code block?

Put three backticks on a line before and after the code. Add a language name after the opening backticks if you want syntax colouring.

Does every site support the same Markdown?

The core is shared, but extras such as task lists and tables differ. Preview your text where it will be shown.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools