Markdown is everywhere. GitHub READMEs, documentation sites, Reddit posts, Notion pages, Jupyter notebooks, Slack messages — if you're a developer, you write Markdown every day whether you realize it or not. It's the simplest way to add formatting to plain text, and once you learn the syntax, you'll never want to use a rich text editor again.
This cheat sheet covers every Markdown syntax element you'll need, organized by category. Bookmark this page and come back whenever you need a quick reference.
What Is Markdown?
Markdown is a lightweight markup language created by John Gruber in 2004. The idea is simple: use readable, plain-text formatting syntax that converts easily to HTML (and other formats). You write **bold**, and it becomes bold. You write # Heading, and it becomes an
There's no standard Markdown specification — the original syntax has been extended by various implementations. The most common variant is GitHub Flavored Markdown (GFM), which adds support for tables, task lists, strikethrough, and more. This guide primarily covers GFM since it's what most developers use daily.
Headings
Create headings using hash symbols. The number of hashes indicates the heading level (1–6):
For H1 and H2, you can also use underline style:
Text Formatting
italic text
bold and italic
inline codeParagraphs and Line Breaks
Create a paragraph by leaving a blank line between text. For a line break within a paragraph, end the line with two or more spaces (or a backslash):
Lists
Unordered Lists
- Item 1
- Item 2
- Nested item
- Another nested item
- Item 3
Ordered Lists
Task Lists (GitHub Flavored)
Links
Images
Tip: To link an image, wrap it in a link: [](link-url)
Code Blocks
Use triple backticks with an optional language identifier for syntax highlighting:
Common language identifiers: javascript, python, html, css, json, bash, sql, typescript, java, cpp, go, rust, yaml, markdown, diff.
Blockquotes
Horizontal Rule
All three produce the same horizontal line.
Tables
| Syntax | Description |
|---|---|
| Header | Title |
| Paragraph | Text |
Escaping Characters
If you need to display a Markdown character literally, prefix it with a backslash:
Characters that can be escaped: \ ` `` ` ` ` * _ { } [ ] ( ) # + - . ! |
Advanced Markdown Features
Footnotes
Definition Lists
collapsible Sections (HTML)
Admonitions / Callouts (varies by platform)
Math Expressions (varies by platform)
Markdown in Practice
GitHub README Template
Common Mistakes
- Nesting without indentation. Nested list items must be indented by at least 2 spaces (or aligned with the parent's text).
- Not escaping HTML entities. If your content contains
<or&, they may be interpreted as HTML. Use<and&when needed. - Inconsistent list markers. Stick with one type (hyphens, asterisks, or plus signs) per list for consistency.
- Forgetting blank lines before headings. Some processors require a blank line before headings for them to render correctly.
- Using spaces instead of tabs in code blocks. Use consistent indentation (4 spaces or 1 tab) in fenced code blocks.
Markdown Variants
Different platforms extend Markdown in different ways:
- GitHub Flavored Markdown (GFM): Tables, task lists, strikethrough, auto-linked URLs. Used on GitHub, GitLab, and many documentation sites.
- CommonMark: A formal specification that standardizes basic Markdown syntax.
- MultiMarkdown: Adds footnotes, tables, metadata, and cross-references.
- MDX: Markdown + JSX, used in React-based documentation sites. Lets you embed interactive components.
- Obsidian Flavored Markdown: Adds wiki-links, tags, callouts, and embeds for note-taking.
Preview your Markdown instantly with live rendering and syntax highlighting.
Try Markdown Preview →Conclusion
Markdown is one of the most practical skills a developer can learn. It takes about 15 minutes to learn the basics and a lifetime to master — but honestly, the basics cover 95% of what you'll ever need. The syntax is simple, readable even in raw form, and supported virtually everywhere.
Whether you're writing READMEs, documentation, blog posts, or just taking notes, Markdown lets you focus on your content instead of wrestling with formatting. Bookmark this cheat sheet, and you'll have everything you need right at your fingertips.