C.W.K.
Stream
Lesson 05 of 08 · published

Alerts — > [!NOTE], [!WARNING], and Friends

~10 min · markdown, gfm, alerts, callouts

Level 0Plaintext
0 XP0/64 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Blockquotes that GitHub turns into colored callouts

GFM alerts are a blockquote whose first line is [!TYPE] (uppercase, square brackets). On GitHub the renderer drops the [!TYPE] line and styles the rest of the quote with a colored bar, an icon, and a labeled header.

Five alert types

  • [!NOTE] — neutral information, blue.
  • [!TIP] — helpful suggestion, green.
  • [!IMPORTANT] — must-read, purple.
  • [!WARNING] — possible footgun, yellow/orange.
  • [!CAUTION] — risky action, red.

Portability

Alerts are a GitHub-only extension. Other renderers (pandoc, plain CommonMark, most static-site generators without a GitHub-style plugin) treat [!NOTE] as literal text inside a blockquote. The fallback is still readable, but it loses the visual styling.

Don't mix alert types in one block. Each alert is one type. If you have both a tip and a warning about the same thing, write two separate alerts. The renderer styles by the first line only.

Code

All five alert types·markdown
> [!NOTE]
> Useful information that helps the reader.

> [!TIP]
> A pro move that saves time.

> [!IMPORTANT]
> Crucial information needed for success.

> [!WARNING]
> Urgent info — avoid problems.

> [!CAUTION]
> Negative consequences if ignored.
Multi-line alert with formatting·markdown
> [!IMPORTANT]
> Run the migration **before** deploying.
>
> Steps:
> 1. Apply `0042_user_schema.sql`
> 2. Verify the count: `SELECT COUNT(*) FROM users WHERE email IS NOT NULL`
> 3. Then deploy the new code
Portable fallback (renders everywhere)·markdown
> **Warning:** This is the CommonMark-portable equivalent of an alert.
> Use it when you target docs sites that don't render GFM alerts.

External links

Exercise

Open a recent README that has 'Note:' or 'Warning:' paragraphs. Convert each to a GFM alert with the right type. Push to a feature branch and view on GitHub. Then view the same file in your local Markdown previewer (VS Code, Obsidian) and compare — that delta is the GFM portability tax.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.