THE GITHTML FIELD GUIDE

Use GitHub Markdown alerts with a readable fallback

Use GitHub's alert syntax for a short, important note, warning, or caution, but keep the meaning explicit in the text itself. Other Markdown processors may display the marker literally or treat it as a normal quotation. Test exports separately and never make color or an icon the only signal that an action is risky.

Choose an alert because the reader must notice something

A page covered in alerts makes every paragraph compete for attention. Reserve the pattern for information that changes what the reader should do next: a prerequisite, an irreversible effect, or an important limit. Ordinary explanation belongs in ordinary prose. Write the alert as a complete sentence naming both the condition and the consequence. For example, a sample cleanup procedure can state that the directory must contain disposable test files. Avoid labels such as important without explaining why. The alert's visible style should reinforce a clear instruction, not compensate for a vague one.

Keep the GitHub-specific syntax contained

The fixture uses an alert marker on the first quoted line and explanatory text on the next. Preview it on the intended GitHub surface, then run the same source through the separate documentation generator if one is used. Do not assume support from the fact that both products call their input Markdown. If the second output lacks a styled alert, decide whether a plainly labeled blockquote is sufficient or whether an explicit conversion step is needed. Keep that decision in the authoring convention. Avoid stacking alerts or hiding them inside complex nested structures, which makes both syntax and reading order harder to follow.

markdown
> [!CAUTION]
> Use only disposable sample files. This exercise replaces the sample output directory.

Verify the fallback with the styling mentally removed

Read only the alert's words. A reader should still understand the condition, the risk, and the safe next step without a colored border. Check that the alert remains adjacent to the action it qualifies after export, page splitting, or section reordering. Do not put a critical warning solely in a screenshot. For a reusable template, leave a concrete prompt that asks the author to name the affected resource and consequence rather than a generic warning placeholder. Review the warning whenever the procedure changes, because an unchanged callout can become inaccurate even when it continues to render correctly. For procedures with several risks, use a dedicated prerequisites section and reserve the alert for the most immediate consequence. This keeps repeated warning blocks from overwhelming the actual sequence.

  1. Select one instruction that genuinely affects success or safety before adding the alert syntax.
  2. Render the fixture in each supported publication pipeline and record differences.
  3. Read the alert without its color or icon and verify that its meaning remains complete.
  4. Keep the warning near its action and revisit both together during future edits.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All markdown and readme files guides →

Read as MarkdownAll guides

Use GitHub Markdown alerts with a readable fallback · gitHtml