The Ultimate Markdown Cheat Sheet 📝

A comprehensive, copy-paste ready Markdown cheat sheet, beautifully rendered with Astro and MDX.

This page is your one-stop copy-paste cheat sheet for everything Markdown. It’s built with plain Markdown and a touch of HTML, ensuring it looks great in MDX and Astro.

💡 Pro Tip: For enhanced features like Task Lists and advanced Tables, enable GitHub Flavored Markdown (GFM) in your Astro MDX configuration.


Headings

To create structure in your document, use headings.

COPY

Markdown
# Heading 1

## Heading 2

### Heading 3

PREVIEW

Heading 1

Heading 2

Heading 3

Text Formatting

COPY

Markdown
*Italic text* or _Italic text_
**Bold text** or __Bold text__
~~Strikethrough~~
`Inline code`

PREVIEW

Italic text or Italic text

Bold text or Bold text

Strikethrough

Inline code

Lists

COPY

Markdown
1. First ordered item
2. Second item
 - Unordered sub-item.
 - Another sub-item.
4. It doesn't matter what number you use.

PREVIEW

  1. First ordered item
  2. Second item

    • Unordered sub-item.
    • Another sub-item.
  3. It doesn’t matter what number you use.

Code Blocks

COPY

Markdown
```javascript
function greet(name) {
// Use template literals for strings
return `Hello, ${name}!`;
}
```

PREVIEW

function greet(name) {
  // Use template literals for strings
  return `Hello, ${name}!`;
}

Advanced Elements

GFM Tables

COPY

Markdown
| Left | Center | Right |
| :--- | :----: | ----: |
| L1   |   C1   |    R1 |
| L2   |   C2   |    R2 |

PREVIEW

LeftCenterRight
L1C1R1
L2C2R2

Collapsible Details

COPY

HTML
<details>
<summary><b>Click to learn more</b></summary>
<p>This content was hidden, but now it's visible! Works in MDX out of the box.</p>
</details>

PREVIEW

Click to learn more

This content was hidden, but now it’s visible! Works in MDX out of the box.

GitHub-Style Callouts (Admonitions)

While standard Markdown doesn’t support this, MDX lets us create a powerful Callout component to replicate and enhance this feature.

COPY

MDX Component
> [!NOTE]
> Content of the note.

PREVIEW

Note
This is a note. Use it for information that is nice to know.

COPY

MDX Component
> [!TIP]
> This is a tip.

PREVIEW

Pro Tip
You can customize the title of any callout. This is a helpful suggestion.

COPY

MDX Component
> [!IMPORTANT]
> This information is important.

PREVIEW

Important
This contains must-read information for the user.

COPY

MDX Component
> [!WARNING]
> This is a warning.

PREVIEW

Warning
Be careful! This action might have unintended consequences.

COPY

MDX Component
> [!CAUTION]
> Proceed with caution.

PREVIEW

Caution
Danger! This action is destructive and cannot be undone. Proceed with extreme care.

COPY

MDX Component
> [!INFORMATION]
> Additional information.

PREVIEW

Information
This is some additional information for the user.

COPY

MDX Component
> [!EXAMPLE]
> This is an example.

PREVIEW

Example
This is an example of how to use the callout component.

Other Useful Markdown Features

Footnotes

COPY

Markdown
Here is some text with a footnote.[^1]

And here is another one.[^another]

[^1]: This is the first footnote's content.
[^another]: Footnotes can have names or numbers.

PREVIEW

Here is some text with a footnote.1

And here is another one.2


  1. This is the first footnote’s content.
  2. Footnotes can have names or numbers.

Using Frontmatter Variables

You can inject variables from your frontmatter directly into your content.

COPY

MDX
This cheat sheet is for **&#123;frontmatter.technology&#125;**.
It was last updated on *&#123;frontmatter.dateFormatted&#125;*.

PREVIEW

This cheat sheet is for Markdown.

It was last updated on Aug 11th, 2025.

Gerardo ICS

© 2025 Gerardo Rodriguez

Linkedin GitHub