Markdown: Everything You Need and Nothing You Don't
The complete practical Markdown reference. Standard syntax, GitHub-flavored extensions, and the patterns that make documentation actually readable.
Advertisement
Markdown is one of those things you learn by writing it, then forget the less-common syntax and re-look it up every time. This is the reference you actually need.
The Core Syntax
- # Headings โ use 1-6 # signs for h1-h6. Space after # is required.
- **bold** and *italic* โ double asterisks for bold, single for italic. _also works_ for italic.
- - Unordered lists โ use -, +, or * as bullets. Indent 2-4 spaces for nested lists.
- 1. Ordered lists โ numbers followed by period. Numbers don't need to be sequential (1. 1. 1. renders correctly).
- [link text](url) โ links. [text](url 'Optional title') adds a tooltip.
-  โ images. Alt text is required for accessibility.
- `inline code` โ backticks for inline code. Preserves whitespace and disables Markdown inside.
- --- โ horizontal rule. Three or more hyphens, asterisks, or underscores.
- > blockquote โ prefix lines with > for blockquotes. Nestable with >>.
Code Blocks
Fenced code blocks use triple backticks with optional language for syntax highlighting:
Example
```javascript const greeting = 'hello'; console.log(greeting); ```
Indented code (4 spaces) also works but is harder to read and doesn't support language syntax highlighting. Always use fenced blocks.
GitHub Flavored Markdown Additions
- Tables: | Col1 | Col2 | / | --- | --- | / | Data | Data |
- Task lists: - [ ] unchecked, - [x] checked. Renders as checkboxes on GitHub.
- Strikethrough: ~~text~~ renders as text with a strikethrough line.
- Autolinks: bare URLs and @mentions auto-link on GitHub.
- Footnotes: text[^1] with [^1]: footnote definition at the bottom.
Documentation Patterns Worth Using
- Start README files with a description, then installation, then quick start example, then full documentation link. The person cloning your repo needs these in order.
- Use admonitions (callout boxes) for warnings: '> **Warning** Be careful of...' Most doc platforms support custom callout styles.
- Code examples should be complete and runnable, not snippets that require context to understand.
- Link to other docs rather than duplicating. A link to the official docs for a dependency is better than a paraphrased version that will become outdated.
Frequently Asked Questions
What is Markdown and why do developers use it?+
What's the difference between Markdown and MDX?+
How do I create a table in Markdown?+
Can I use HTML inside Markdown?+
Advertisement
๐ง Free Tools Used in This Guide
Priya Shah
Senior Software Engineer ยท 9+ years experience
Priya has nine years of experience building distributed systems and developer tooling at two B2B SaaS companies. She writes about APIs, JSON/JWT workflows, regex, DevOps, and the small utilities that make debugging faster at 2am.
View all posts by Priya Shah โTags: