Markdown Cheat Sheet

Markdown is a lightweight markup language. Its design allows it to be converted to many output formats like HTML.

This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic syntax and extended syntax.

Overview

Contents below are directly modified from the official cheatsheet with syntax not supported by Hugo marked ×.

Basic Syntax

These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements.

Heading

H1

H2

H3

# H1
## H2
### H3

Bold

bold text

**bold text**

Italic

italicized text

*italicized text*

Blockquote

blockquote

> blockquote

Ordered List

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

Unordered List

  • First item
  • Second item
  • Third item
- First item
- Second item
- Third item

Code

code

`code`

Horizontal Rule


---

Markdown Guide

[Markdown Guide](https://www.markdownguide.org)

Image

alt text

![alt text](https://www.markdownguide.org/assets/images/tux.png)

Extended Syntax

These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.

Table

SyntaxDescription
HeaderTitle
ParagraphText
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |

Fenced Code Block

{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Footnote

Here’s a sentence with a footnote. 1

Here's a sentence with a footnote. [^1]

[^1]: This is the footnote.

Heading ID

My Great Heading

### My Great Heading {#custom-id}

Definition List

term
definition
term
: definition

Strikethrough

The world is flat.

~~The world is flat.~~

Task List

  • Write the press release
  • Update the website
  • Contact the media
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

Emoji ×

That is so funny! :joy: Gone camping! :tent: Be back soon.

That is so funny! :joy:
Gone camping! :tent: Be back soon.

(See also Copying and Pasting Emoji)

Highlight ×

I need to highlight these ==very important words==.

I need to highlight these ==very important words==.

Subscript ×

H2O

Superscript ×

X^2^


  1. This is the footnote. ↩︎