Markdown Cheat Sheet: Complete Guide for Beginners

Everything you need to write Markdown — from basic syntax to advanced formatting, with copy-paste examples.

Developer Tools 2026-04-09 By Risetop Team 13 min read

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):

# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6

For H1 and H2, you can also use underline style:

Heading 1 ========= Heading 2 ---------

Text Formatting

**bold text** *italic text* ***bold and italic*** ~~strikethrough~~ `inline code` subscript superscript
bold text
italic text
bold and italic
strikethrough
inline code

Paragraphs 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):

First line. Second line (line break above). New paragraph (blank line above).

Lists

Unordered Lists

- Item 1 - Item 2 - Nested item - Another nested item - Item 3 * You can also use * + Or plus signs
  • Item 1
  • Item 2
    • Nested item
    • Another nested item
  • Item 3

Ordered Lists

1. First item 2. Second item 3. Third item 1. Nested ordered item 2. Another nested item

Task Lists (GitHub Flavored)

- [x] Completed task - [ ] Incomplete task - [ ] Another task

Links

[Link text](https://example.com) [Link with title](https://example.com "Hover text") <https://example.com> (auto-linked URL) [Reference link][ref] [ref]: https://example.com "Reference link"

Images

![Alt text](image-url.png) ![Alt text](image-url.png "Title text") ![Alt text](image-url.png){width=600px} (some processors)

Tip: To link an image, wrap it in a link: [![Alt](image.png)](link-url)

Code Blocks

Use triple backticks with an optional language identifier for syntax highlighting:

```javascript function greet(name) { return `Hello, ${name}!`; } console.log(greet("World")); ```

Common language identifiers: javascript, python, html, css, json, bash, sql, typescript, java, cpp, go, rust, yaml, markdown, diff.

Blockquotes

> This is a blockquote. > > > Nested blockquote. > > **Blockquotes can contain formatting.**

Horizontal Rule

--- *** ___

All three produce the same horizontal line.

Tables

| Syntax | Description | | ----------- | ----------- | | Header | Title | | Paragraph | Text | | Left-aligned | Center-aligned | Right-aligned | | :----------- | :------------: | ------------: | | Left | Center | Right |
SyntaxDescription
HeaderTitle
ParagraphText

Escaping Characters

If you need to display a Markdown character literally, prefix it with a backslash:

\*not italic\* \# not a heading \[not a link\]

Characters that can be escaped: \ ` `` ` ` ` * _ { } [ ] ( ) # + - . ! |

Advanced Markdown Features

Footnotes

Here's a statement with a footnote[^1]. [^1]: This is the footnote content.

Definition Lists

Term 1 : Definition of term 1 Term 2 : Definition of term 2

collapsible Sections (HTML)

<details> <summary>Click to expand</summary> Hidden content here. </details>

Admonitions / Callouts (varies by platform)

> [!NOTE] > This is a note callout (GitHub-style). > [!WARNING] > This is a warning callout. > [!TIP] > This is a tip callout.

Math Expressions (varies by platform)

Inline: $E = mc^2$ Block: $$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $$

Markdown in Practice

GitHub README Template

# Project Name Brief description of what this project does. ## Features - Feature one - Feature two - Feature three ## Installation \`\`\`bash npm install project-name \`\`\` ## Usage \`\`\`javascript import { something } from 'project-name'; something.doThing(); \`\`\` ## Contributing 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing`) 5. Open a Pull Request ## License MIT © 2026
💡 Tip: Use an online Markdown preview tool to test your Markdown before committing. It's faster than pushing to GitHub just to see how your README looks.

Common Mistakes

  1. Nesting without indentation. Nested list items must be indented by at least 2 spaces (or aligned with the parent's text).
  2. Not escaping HTML entities. If your content contains < or &, they may be interpreted as HTML. Use &lt; and &amp; when needed.
  3. Inconsistent list markers. Stick with one type (hyphens, asterisks, or plus signs) per list for consistency.
  4. Forgetting blank lines before headings. Some processors require a blank line before headings for them to render correctly.
  5. 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:

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.