Misc
Markdown Cheat Sheet

Markdown Cheat Sheet

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 (opens in a new tab) and extended syntax (opens in a new tab).

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

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


---

Link

Markdown Guide (opens in a new tab)
[Markdown Guide](https://www.markdownguide.org)

Image - Hosted Online

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

Image - Hosted Locally

alt text ![alt text](../../assets/images/cs2_logo.jpg)

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
}

Fenced Code Block with Syntax highlighting (JSON)

contact_object.js
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Fenced Code Block with Syntax highlighting (JS)

contact_object.js
var contact = 
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
 
console.log("This is the contact object ====>>> " + contact)

This example also includes specific line highlighting, simply add this after the opening code block markup:

js filename="contact_object.js" {3} copy

To modify, keep in mind the following pattern:

<syntax language> filename="<filename.extension>" {<desired line number to highlight>} copy

The copy markup creates a clipboard icon in the top right corner of the code block to easily click to copy to your clipboard

Footnote

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

Heading 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:
:joy:

(See also Copying and Pasting Emoji (opens in a new tab))

Highlight

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

Subscript

H2O
H~2~O

Superscript

X^2^
X^2^

YouTube

LoFi Simpsons (opens in a new tab) [![Image alt text](https://img.youtube.com/vi/YOUTUBE-ID/0.jpg)](https://www.youtube.com/watch?v=YOUTUBE-ID)

Footnotes

  1. This is the footnote.