Back to blog
|11 min read|Docsio

Markdown Cheat Sheet: The Complete 2026 Reference

markdown-cheat-sheetmarkdowndocumentationdeveloper-tools
Markdown Cheat Sheet: The Complete 2026 Reference

Markdown Cheat Sheet: The Complete 2026 Reference

This markdown cheat sheet covers every syntax element you need, from basic headings and bold text to tables, task lists, and footnotes. Markdown is a plain-text formatting syntax that converts to clean HTML, which is why it powers READMEs, wikis, notes apps, and most modern docs sites. Each section below pairs the exact syntax with what it produces, so you can scan, copy, and move on.

If you write Markdown often, it helps to know where the format ends and its extensions begin. Plain Markdown handles the basics; GitHub Flavored Markdown and MDX add tables, task lists, and components on top. For a deeper comparison of formats, see AsciiDoc vs Markdown, and if you are choosing a tool to write in, our roundup of the best Markdown editor options is a good next stop.

Use this page as a reference. Bookmark it, skim the quick-reference block near the end, or jump straight to the FAQ.

Headings

Use # symbols before your text. The number of # characters sets the heading level, from H1 (one) to H6 (six). Always put a space after the #.

SyntaxResult
# Heading 1Largest heading (H1)
## Heading 2H2
### Heading 3H3
#### Heading 4H4
##### Heading 5H5
###### Heading 6Smallest heading (H6)

There is also an alternate syntax for H1 and H2 using underlines:

Heading 1
=========

Heading 2
---------

Best practice: use only one H1 per document, and do not skip levels (go from H2 to H3, not H2 to H4).

Emphasis: bold, italic, strikethrough

Wrap text in asterisks or underscores. Use asterisks when the text sits inside a word, since some parsers ignore underscores mid-word.

SyntaxResult
*italic* or _italic_italic
**bold** or __bold__bold
***bold italic***bold italic
~~strikethrough~~strikethrough

Strikethrough is part of GitHub Flavored Markdown, not the original spec, but nearly every modern editor supports it.

Lists

Unordered lists

Start each item with -, *, or +. Pick one marker and stay consistent.

- First item
- Second item
- Third item

Ordered lists

Start each item with a number followed by a period. The actual numbers do not need to be sequential; Markdown renumbers them in order, so a list written with 1. on every line still renders 1, 2, 3.

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

Nested lists

Indent sub-items by two or four spaces under the parent item.

- Parent item
  - Child item
    - Grandchild item
1. First step
   1. Sub-step
   2. Sub-step

Task lists

A GitHub Flavored Markdown feature. Use - [ ] for an open task and - [x] for a completed one.

- [x] Write the draft
- [ ] Review edits
- [ ] Publish

Links

SyntaxResult
[link text](https://example.com)An inline link
[link text](https://example.com "Hover title")Link with a tooltip title
<https://example.com>An autolink (raw URL)
[link text][ref]A reference-style link

Reference-style links keep long URLs out of your prose. Define the reference anywhere in the document:

Here is a [reference link][docs].

[docs]: https://example.com/docs "Optional title"

To link to a heading within the same page, lowercase the heading text, replace spaces with hyphens, and drop punctuation: [jump to lists](#lists).

Images

Image syntax is link syntax with a leading !. The text in brackets becomes the alt text, which matters for accessibility and SEO.

SyntaxResult
![alt text](/path/to/image.jpg)An inline image
![alt text](/image.jpg "Caption title")Image with a title attribute

To make an image clickable, wrap it in link syntax:

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

Code

Inline code

Wrap a word or phrase in single backticks to format it as code: `inline code`. If your code itself contains a backtick, wrap it in double backticks instead.

SyntaxResult
`const x = 1`const x = 1
`` use `backticks` ``use `backticks`

Fenced code blocks

Wrap a block in three backticks. Add a language name after the opening fence to enable syntax highlighting.

```js
function greet(name) {
  return `Hello, ${name}`;
}
```

You can also create a code block by indenting every line four spaces, though fenced blocks with a language label are the modern standard.

Blockquotes

Start a line with >. Stack > symbols to nest quotes, and you can use other Markdown (like bold or lists) inside a quote.

> This is a blockquote.
>
> > This is a nested blockquote.
>
> - Lists work inside quotes too.

Tables

Tables are GitHub Flavored Markdown. Separate columns with pipes (|) and add a divider row of hyphens under the header. Colons in the divider row control alignment.

| Left | Center | Right |
| :--- | :----: | ----: |
| a    | b      | c     |
| d    | e      | f     |
DividerAlignment
:---Left-aligned
:---:Center-aligned
---:Right-aligned

The columns do not need to line up in your source file; the spacing above is only for readability. To put a literal pipe character inside a cell, escape it as \|.

Horizontal rules

Put three or more hyphens, asterisks, or underscores on their own line, with a blank line above and below.

---
***
___

Line breaks and paragraphs

A new paragraph needs a blank line between blocks of text. A single line break is trickier: end a line with two trailing spaces, or use a backslash \, to force a break without starting a new paragraph.

First paragraph.

Second paragraph.

Line one with two trailing spaces  
Line two, same paragraph

Escaping characters

To show a Markdown character literally instead of having it format your text, put a backslash \ in front of it.

SyntaxResult
\*not italic\**not italic*
\# not a heading# not a heading

Characters you can escape include: \ ` * _ { } [ ] ( ) # + - . ! |.

GitHub Flavored Markdown: extended syntax

GitHub Flavored Markdown (GFM) is the dialect used on GitHub, GitLab, and most docs platforms. It is a superset of the original Markdown spec, adding features the original lacked. Everything above marked as GFM lives here, plus the items below.

Footnotes

Add a reference with [^1] and define the note anywhere in the document.

Here is a statement that needs a source.[^1]

[^1]: This is the footnote text.

Autolinks

GFM turns bare URLs into clickable links automatically. Typing https://example.com is enough; no brackets required.

Syntax highlighting

The language label on a fenced code block, such as python, bash, or json placed right after the opening fence, tells the renderer how to color the code. Most platforms support dozens of languages.

Emoji

Many GFM renderers support shortcode emoji like :rocket: and :tada:, which render as the matching emoji.

Mentions and references

On GitHub specifically, @username notifies a user and #123 links to an issue or pull request. These are platform features, not portable Markdown.

Markdown flavors compared

Not every renderer supports every feature. Here is how the common dialects stack up.

FeatureOriginal MarkdownGitHub Flavored MarkdownMDX
Headings, lists, links, imagesYesYesYes
TablesNoYesYes
Task listsNoYesYes
StrikethroughNoYesYes
FootnotesNoYesYes
Syntax highlightingNoYesYes
React/JSX componentsNoNoYes

If you want components and interactivity inside your Markdown, that is what MDX adds. For most docs, GFM covers everything you need.

Copy-ready quick reference

Keep this block handy. It is the whole cheat sheet in one place.

# H1   ## H2   ### H3

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

- bullet
1. numbered
- [ ] task    - [x] done

[link](https://example.com)
![image alt](/path.jpg)

> blockquote

| Col A | Col B |
| ----- | ----- |
| cell  | cell  |

---

```language
code block
```

Footnote[^1]
[^1]: note text

How Markdown becomes a published site

Markdown is just text, so on its own it does not render or host anywhere. You need a renderer to convert it to HTML and somewhere to serve it. That is where static site generators and docs platforms come in: they take your .md files, apply a theme, and publish them. If you work in a docs-as-code workflow, your Markdown lives in Git alongside your project, and the build step turns it into pages. Tools like Docsio turn your Markdown into a branded, hosted docs site automatically, so you can focus on writing instead of wiring up a renderer. For more on structuring the content itself, see our guide on how to write documentation.

Frequently asked questions

What is Markdown used for?

Markdown is used for writing formatted text in plain files that convert to clean HTML. Common uses include README files, technical documentation, wikis, blog posts, notes apps, forum comments, and chat messages. Its readability as plain text and wide tool support make it the default format for developer and writing workflows.

Is Markdown easy to learn?

Yes. Markdown was designed to be readable and writable by anyone, and most people learn the core syntax in under an hour. You can format a full document using just headings, bold, italic, lists, and links. The advanced features like tables and footnotes are optional and easy to pick up when you need them.

What is the difference between Markdown and rich text?

Rich text editors like Microsoft Word hide formatting behind buttons and store it in binary files. Markdown keeps formatting visible as plain-text symbols in a file you can read anywhere, version with Git, and edit in any text editor. Markdown is portable and future-proof; rich text is locked to its application.

How do I write Markdown?

Type plain text and add simple symbols to format it: # for headings, * or _ for emphasis, - for lists, and square brackets with parentheses for links. Save the file with a .md extension. Any Markdown editor, code editor, or docs platform will render it into formatted output.

What is GitHub Flavored Markdown?

GitHub Flavored Markdown (GFM) is GitHub's extended version of the original Markdown spec. It adds tables, task lists, strikethrough, footnotes, automatic URL linking, syntax-highlighted code blocks, and emoji shortcodes. GFM has become the de facto standard, supported by GitLab, most static site generators, and modern documentation tools.

Ready to ship your docs?

Generate a complete documentation site from your URL in under 5 minutes.

Get Started Free