PrettyGit
Get started

GitHub Markdown cheat sheet for READMEs

Updated 25 November 2026

Short answer

GitHub READMEs use GitHub Flavored Markdown: standard Markdown plus tables, task lists, footnotes, alerts, Mermaid diagrams and math, and a safe subset of HTML for alignment, sizing and collapsible sections. Scripts, styles and iframes are stripped.

Text and structure

# Heading 1
## Heading 2

**bold**, *italic*, ~~strikethrough~~, `inline code`

- bullet
1. numbered
- [ ] task
- [x] done

> quote

[link](https://example.com) and a footnote[^1]

[^1]: The footnote text.

Tables and code

| Option | Default |
| --- | :---: |
| theme | light |

```js
console.log('syntax highlighted')
```

Alerts

> [!NOTE]
> Useful information.

> [!TIP]
> A helpful suggestion.

> [!WARNING]
> Something to watch out for.

GitHub also supports IMPORTANT and CAUTION.

HTML that works

<p align="center">
  <img src="docs/banner.svg" width="600" alt="Banner">
</p>

<details>
  <summary>Show more</summary>

  Hidden content, Markdown allowed after a blank line.
</details>
  • Allowed: p, div and h1-h6 with align, img with width and height, a, picture and source, details and summary, br, sub, sup, kbd, table.
  • Removed: script, style, iframe, inline event handlers and most style attributes.

Diagrams and math

```mermaid
flowchart LR
  A[Write] --> B[Commit] --> C[Profile]
```

Inline math: $E = mc^2$

FAQ

Can I use CSS in a GitHub README?
Not directly; style tags and attributes are removed. Styling lives inside images, which is why styled READMEs use SVG cards.
How do I center things in a README?
Wrap them in <p align="center"> or <div align="center">.
Skip the syntax: pick a skin