Markdown Cheatsheet for README Files
Markdown is the lingua franca of open source documentation. But beneath its deceptively simple syntax lies a surprisingly rich feature set that most developers don't know about. Master these, and your READMEs will look professional — not patched together.
Headers and Hierarchy
Use a maximum of three header levels in your README (#, ##, ###). More creates visual noise and makes the document hard to scan:
# Project Title <-- Section
## Installation <-- Subsection
### macOS <-- Sub-subsection (sparingly)
Some paragraph text <-- Body text (no header)
Pro tip: headers automatically generate anchor links on GitHub. #headers becomes #headers as a URL slug you can link to.
Emphasis and Inline Formatting
**Bold text** → project name
*Italic text* → *important*
~~Strikethrough~~ → ~~deprecated~~
`inline code` → `npm install`
Use bold sparingly for emphasis on key terms. Use inline code for any file paths, commands, configuration keys, and API parameters. This is the single most-used formatting in technical READMEs.
Tables (Underutilized Gem)
Tables are perfect for API documentation, configuration options, or comparison tables. Many developers skip them because the syntax is verbose, but they're incredibly readable once rendered:
| Flag | Type | Default | Description |
|--------------|---------|---------|------------------------------|
| --port | number | 3000 | Server listening port |
| --verbose | boolean | false | Enable debug logging |
| --config | string | ./config.json | Path to config file |
Code Blocks with Language Syntax
Always specify the language for syntax highlighting. GitHub supports 300+ languages:
\`\`\`javascript
const app = express();
app.listen(3000);
\`\`\`
\`\`\`bash
npm install && npm run dev
\`\`\`
Choosing "bash" instead of plain text for shell commands adds crucial syntax highlighting. It's a small detail that dramatically improves readability.
Task Lists (Checkboxes)
GitHub-flavored Markdown extends standard Markdown with task lists. Perfect for roadmaps, TODO items, or installation checklists:
- [x] Set up project structure
- [x] Write installation guide
- [ ] Add API documentation
- [ ] Create contributing guide
- [ ] Set up CI/CD pipeline
This renders as actual checkboxes — clickable in issues and PRs, informative in READMEs.
Linking and Images
Inline link: [GitHub](https://github.com)
Relative image: 
External image: 
Reference-style links (cleaner for long URLs):
[docs]: https://github.com/user/project/wiki
[more info][docs]
When using badges, you must use absolute URLs. Shields.io, GitHub badges, and all badge services return image URLs that work only when fully qualified.
Blockquotes for Emphasis
Use blockquotes (> symbol) for important notices, warnings, or extracted quotes:
> **Warning:** This package is not yet stable.
> Breaking changes may occur before v1.0.0.
Blockquotes with a "Warning" or "Tip" label at the start are extremely effective for alerting users to important information without burying it in paragraph text.
Horizontal Rules and Whitespace
Use --- to create visual separation between major sections. Combine generous spacing (blank lines) between elements for readability. A crowded README is an unreadable README.
Advanced: GitHub-Specific Markdown
GitHub enhances standard Markdown with its own extensions:
- Autolinks — #1234 becomes a link to issue 1234; user/repo#1234 links to that specific issue anywhere
- @mentions — @username notifies that person and links to their profile
- Emoji shortcodes — :rocket: becomes :rocket:, :tada: becomes :tada:, etc.
- Strikethrough — ~~text~~ works in comments, PR descriptions, and READMEs
- Wiki links — [[Wiki Page]] links to your repository's wiki
Quick Reference Summary
| Element | Syntax | Output |
|---|---|---|
| Heading | ## Heading | Heading |
| Bold | **text** | text |
| Code | `code` | code |
| Link | [text](url) | text |
| Image |  | Image |
Master these Markdown features, and your README will stand out for all the right reasons. And if you'd rather not type them manually, try the README Generator Tool — it handles all of this formatting automatically from your source code.