← Back to blog/Guides

Markdown Callouts: Notes, Warnings, and GitHub Alerts

Choose portable labeled notes or GitHub-specific alerts, write actionable warnings, and avoid hiding essential instructions behind styling.

F
Faizan Khan
• 6 min read

For a portable Markdown warning, use a clearly labeled paragraph or blockquote, such as > **Warning:** Keep a backup before replacing the file. On GitHub, [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION] can create styled alerts. Those tokens are platform features, not universal CommonMark callout syntax.

Markdown
1> **Warning:** Replacing this file removes its current contents.
2> Keep a copy before continuing.

This remains understandable even when a renderer provides only an ordinary quote border rather than a colored warning box. The actual meaning is in the label, consequence, and safeguard.

Choose between a note, warning, and ordinary paragraph

InformationBest starting pointExample purpose
Required setupMain procedure or prerequisitesThe user needs access before beginning
Helpful extra contextNoteExplains why a default is recommended
Optional shortcutTipOffers a faster route without changing the outcome
Consequence requiring attentionWarningExplains what can be lost or changed
Destructive or hard-to-reverse actionCaution with a concrete safeguardPrompts the reader to verify before proceeding

Do not turn every interesting sentence into a callout. A page with six warning boxes before its first action makes it difficult to identify the real hazard. If a detail is essential to completing the task, it often belongs directly in the step rather than in a visually separate side note.

Place the warning before the risky action. A perfectly worded warning below the command arrives too late for someone reading and acting in sequence.

GitHub alert syntax

Use the token on its own blockquote line, then the message on another quoted line:

Markdown
1> [!WARNING]
2> Replacing this file removes its current contents. Keep a copy first.

The supported GitHub alert types are:

Markdown
1> [!NOTE]
2> The preview shows the current draft, not the published page.
3
4> [!TIP]
5> Review the smallest representative example first.
6
7> [!IMPORTANT]
8> Use the same destination project throughout this procedure.
9
10> [!WARNING]
11> Replacing the file removes its current contents. Save a copy first.
12
13> [!CAUTION]
14> Do not continue until you have verified the recovery copy.

The GitHub alert documentation is the authority for GitHub's behavior. Its constraints include not nesting alerts within other elements. Do not infer that a note inside a list, table, or HTML wrapper will work simply because a top-level example does.

The formal GFM specification and GitHub.com's full application behavior are not identical feature lists. A generic GFM parser may interpret [!WARNING] as plain text in a blockquote. A renderer needs the additional alert transformation to create GitHub-style output.

What to do when a warning token appears literally

If the page shows [!NOTE], it may be parsing the quote correctly while lacking the alert extension. Adding more exclamation marks will not enable it.

Choose one of these routes based on the publication:

  1. Keep portable quoted text with a bold visible label.
  2. Use the destination's documented callout syntax or component.
  3. Add a maintained alert transform only if you own the publishing stack and have approved that change.

Do not paste several competing spellings into the same page. Syntax such as :::warning, !!! warning, and custom JSX components belongs to particular ecosystems. Treat each as a platform-specific contract, not a synonym for standard Markdown.

For the underlying quote structure, use the blockquote guide. For a broader view of extensions, see the Markdown cheat sheet.

A warning template that explains the risk

Markdown
1> **Warning: replacing the configuration removes local edits.**
2> Before continuing, copy the current configuration to a separate file.
3> Continue only after confirming that the copy contains the values you need.

The template answers three questions: what action matters, what can happen, and what the reader should do first. It is more useful than "Warning! Be careful!" because it gives a concrete check.

Adapt it to the actual procedure. Do not claim that a backup restores data unless the recovery method has been tested. If the action cannot be reversed, say so plainly rather than promising an easy rollback.

For a note, a smaller pattern is sufficient:

Markdown
1> **Note:** The screenshot uses the default layout. Your project name may differ.

Keep examples relevant to the action. A note about an unrelated feature interrupts the task without reducing uncertainty.

Accessibility and visual treatment

Use the words "Warning," "Note," or "Action required" in visible content. Color and icons can reinforce those labels but should not carry the entire distinction. Readers may use high-contrast modes, copied text, or tools that do not preserve decorative styles.

Do not assume a static documentation warning needs the ARIA alert role. That role has live-announcement behavior; applying it indiscriminately to every static note can create unnecessary interruption. Prefer the publication's tested component rather than hand-writing accessibility behavior for each article.

Keep critical warnings expanded and visible. A collapsible section is appropriate for optional logs, not for the only notice that an action deletes data.

Review a callout in the destination

Confirm the label, placement, consequence, and supported syntax. Then inspect the published output without relying on authoring-preview colors. A successful compilation confirms syntax, not that the warning appears before the relevant button or remains readable on a small screen.

If the content also ships as plain Markdown or PDF, check those outputs separately. A fallback that reads as clear labeled prose is more resilient than one that depends on an unrecognized token.

FAQ

How do I make a Markdown info box?

Use a visible labeled note for portability, or the renderer's documented callout feature for styled boxes. Core Markdown does not define a universal info-box component.

Are GitHub alerts part of every GFM renderer?

No. GitHub's alert transformation is an additional platform feature. A generic parser can display the alert token as ordinary text inside a blockquote.

Should I put an important warning in a collapsed section?

No. Keep essential safeguards visible before the action. Reserve collapsed sections for optional explanations, logs, and other supplementary material.

Continue This Guide