Skip to main content

Markdown Cheat Sheet

This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements.

Basic Syntax

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

Heading

#H1

H1

##H2

H2

###H3

H3

####H4

H4

#####H5

H5

######H6

H6

Text

**bold text**

bold text

_italicized text_

italicized text

~~strikethrough text~~

strikethrough text

Blockquote

> blockquote

blockquote

Lists

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

    ```shell
python -m venv ./ENV_NAME
```
python -m venv ./ENV_NAME
    ```js
/**
* Does a thing
*/
function helloWorld(param1, param2) {
var something = 0;

// Do something
if (2.0 % 2 == something) {
console.log("Hello, world!");
} else {
return null;
}

// @TODO comment
}
```
/**
* Does a thing
*/
function helloWorld(param1, param2) {
var something = 0;

// Do something
if (2.0 % 2 == something) {
console.log("Hello, world!");
} else {
return null;
}

// @TODO comment
}
    ```shell
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}

Horizontal Rule

---

[title](https://www.example.com)

title

Image

![alt text](https://images.unsplash.com/photo-1462332420958-a05d1e002413?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2107&q=80)

alt text

Extended Syntax

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

Table

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

Footnote

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

[^1]: This is the footnote.

Here's a sentence with a footnote. 1

My Great Heading With Custom Id For Reference

### My Great Heading With Custom Id For Reference {#custom-id}

Definition List

term
: definition

term : definition

Task List

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

Extended text

Use an emoji! :joy:

Use an emoji! 😂

Highlight these ==very important words==

Highlight these ==very important words==

Subscript H~2~O
Superscript X^2^

Subscript H~2~O Superscript X^2^


References


  1. This is the footnote.

ak © mmxxii