Skip to main content
← All Articles ยท ยท 8 min read

Markdown Cheatsheet for Developers 2026

Complete Markdown cheatsheet for developers: syntax reference, GitHub Flavored Markdown, tables, code blocks, task lists, and tools to write and preview Markdown faster.

markdowncheatsheetdeveloper-toolsdocumentationgithubwriting

Markdown is everywhere in the developer stack: README files, pull request descriptions, GitHub issues, documentation sites, Notion, Slack, Discord, blog posts. Learning it properlyโ€”not just the basicsโ€”saves real time every day.

This cheatsheet covers the full syntax youโ€™ll encounter as a developer, including GitHub Flavored Markdown (GFM) extensions that most developers use without realizing theyโ€™re non-standard.

For a live preview as you write, use the Markdown preview toolโ€”paste or type Markdown and see the rendered output instantly.


Headings

# H1 โ€” Page title
## H2 โ€” Major section
### H3 โ€” Subsection
#### H4 โ€” Minor subsection
##### H5
###### H6

A blank line before and after headings improves readability and avoids parser edge cases.


Text Formatting

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

Renders as: bold, italic, bold and italic, strikethrough, inline code.

For underline: Markdown doesnโ€™t have a native underline syntax. Use <u>underlined</u> if your renderer supports HTML.


[Link text](https://example.com)
[Link with title](https://example.com "Hover title")
[Reference link][ref-id]

[ref-id]: https://example.com

![Alt text](image.png)
![Alt text](image.png "Image title")

For links to headings within the same document:

[Jump to section](#section-name)

Heading IDs are auto-generated: lowercase, spaces replaced with hyphens, special characters removed.


Lists

- Unordered item
- Another item
  - Nested item (2 spaces)
    - Deeper nesting (4 spaces)

1. Ordered item
2. Second item
   1. Nested ordered (3 spaces)
3. Third item

You can mix ordered and unordered lists by nesting them:

1. Step one
   - Sub-task A
   - Sub-task B
2. Step two

Task Lists (GitHub Flavored Markdown)

- [x] Completed task
- [ ] Incomplete task
- [x] Another done item
- [ ] Pending item

Task lists render as checkboxes in GitHub issues, PRs, and README files. On GitHub, you can click them to toggle status.


Code Blocks

Inline code uses single backticks: `code here`

Fenced code blocks use triple backticks with an optional language identifier:

```javascript
const greet = (name) => `Hello, ${name}!`;
console.log(greet("World"));
```

```python
def greet(name):
    return f"Hello, {name}!"
```

```bash
npm install && npm run dev
```

Supported language identifiers: javascript, typescript, python, bash, shell, sql, json, yaml, html, css, go, rust, java, csharp, php, ruby, swift, kotlin, diff, markdown.


Tables (GitHub Flavored Markdown)

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1    | Data     | More     |
| Row 2    | Data     | More     |

Column alignment:

| Left    | Center  | Right   |
|:--------|:-------:|--------:|
| Left    | Center  | Right   |
| aligned | aligned | aligned |
  • :--- โ€” Left aligned (default)
  • :---: โ€” Center aligned
  • ---: โ€” Right aligned

Blockquotes

> This is a blockquote.
> It can span multiple lines.

> Blockquotes can be nested.
>> Like this.
>>> And deeper.

Useful for quoting documentation, error messages, or highlighting important notes.


Horizontal Rule

---
***
___

All three produce a horizontal divider. Three or more hyphens, asterisks, or underscores.


Escaping

To render a literal Markdown character, escape it with a backslash:

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

HTML in Markdown

Most Markdown renderers support inline HTML:

<details>
<summary>Click to expand</summary>

Hidden content goes here. Supports full Markdown inside.

</details>

<kbd>Ctrl</kbd> + <kbd>C</kbd>

<br> for line breaks

The <details> + <summary> pattern is especially useful in GitHub READMEs for collapsible sections.


Footnotes (GitHub Flavored Markdown)

Text with a footnote[^1].

[^1]: This is the footnote content.

Emoji (GitHub Flavored Markdown)

:rocket: :tada: :white_check_mark: :warning: :x:

GitHub converts these shortcodes to emoji. Full list: github.com/ikatyang/emoji-cheat-sheet.


Alerts / Callouts (GitHub Flavored Markdown, 2023+)

> [!NOTE]
> This is a note callout.

> [!TIP]
> This is a tip.

> [!WARNING]
> This is a warning.

> [!IMPORTANT]
> This is important.

> [!CAUTION]
> This is a caution.

These render as styled callout boxes in GitHub. Supported: NOTE, TIP, IMPORTANT, WARNING, CAUTION.


Writing Better READMEs

A good README has:

  1. Project name and one-line description โ€” What is it?
  2. Quick start โ€” How do I run it in under 5 minutes?
  3. Usage examples โ€” What does it actually do?
  4. Configuration reference โ€” What can I change?
  5. Contributing guide โ€” How do I help?
  6. License โ€” Can I use this?

The README generator produces a structured README template for any project. Fill in your project details and get a well-organized README with all the standard sections.


Tools for Faster Markdown Writing

  • Markdown preview โ€” Live preview as you type. See rendering differences between CommonMark and GFM.
  • README generator โ€” Generate a complete README structure from project metadata.
  • HTML to Markdown โ€” Convert HTML content to Markdown. Useful when migrating documentation or pasting from web pages.
  • Word counter โ€” Check length when writing documentation with word-count targets.

Quick Reference Card

SyntaxOutput
**text**bold
*text*italic
`code`inline code
~~text~~strikethrough
[text](url)link
![alt](url)image
# H1 through ###### H6headings
---horizontal rule
> textblockquote
- itemunordered list
1. itemordered list
- [x] itemtask (checked)
- [ ] itemtask (unchecked)

Markdownโ€™s strength is that itโ€™s readable even as raw text. Write it thinking about how it looks in both the source file and the rendered outputโ€”the best Markdown reads naturally in both.

Free Download

50 CLI Commands That Save Hours Every Week

The exact Git shortcuts, file search tricks, Docker commands, and productivity hacks that senior developers use daily. Compiled from 5+ years of shipping production code.

  • Git mastery (10 cmds)
  • File & search wizardry
  • Docker & DevOps tricks
  • Process & network tools
  • Productivity boosters
  • macOS & Linux install guide

No spam. 1 email/week max. Unsubscribe anytime.

Found this guide useful? Check out our free developer tools.