Skip to content
Everyone-Website
Cheat sheet

Markdown Cheat Sheet: Syntax & Examples

A practical Markdown cheat sheet — headings, bold, lists, links, images, code blocks, tables and more, with copy-ready syntax for READMEs, GitHub and docs.

Updated 2 June 2026 6 min read

Markdown is a lightweight way to format plain text using simple punctuation marks instead of buttons or menus. It powers README files, GitHub issues and comments, chat apps, static-site content, and countless documentation tools. This cheat sheet collects the syntax you’ll actually use, grouped by task, with copy-ready examples. Each table shows the literal characters you type — note that a single line break is usually ignored, so leave a blank line between paragraphs.

Headings

Headings run from level 1 (largest) to level 6 (smallest). Put a space after the # characters, and many parsers prefer a blank line before and after a heading.

ElementMarkdownResult
Heading 1# Heading 1Largest, top-level title
Heading 2## Heading 2Section heading
Heading 3### Heading 3Sub-section heading
Heading 4#### Heading 4Smaller heading
Heading 5##### Heading 5Smaller still
Heading 6###### Heading 6Smallest heading

Bold, italic & strikethrough

You can mark text inline. Asterisks and underscores both work for bold and italic; pick one and stay consistent.

ElementMarkdownResult
Italic*italic* or _italic_italic
Bold**bold** or __bold__bold
Bold + italic***bold italic***bold italic
Strikethrough~~struck out~~struck out

Lists (unordered, ordered, nested)

Use -, *, or + for bullet points, and numbers followed by a period for ordered lists. Indent with spaces (two or four) to nest items.

ElementMarkdown
Unordered item- First item
Unordered (alt markers)* Item or + Item
Ordered item1. First item
Nested item - Indented sub-item

A nested example, written out:

- Fruit
    - Apple
    - Orange
1. Step one
2. Step two
    1. Sub-step

Note: most renderers auto-number ordered lists, so you can write 1. on every line and it will still count up correctly.

Links wrap the text in square brackets and the URL in parentheses. Images use the same pattern with a leading !, where the bracketed text becomes the alt text.

ElementMarkdown
Inline link[link text](https://example.com)
Link with title[link text](https://example.com "Hover title")
Reference link[link text][ref] then [ref]: https://example.com
Bare URL (autolink)<https://example.com>
Image![alt text](image.png)
Image with title![alt text](image.png "Caption")
Linked image[![alt text](image.png)](https://example.com)

Inline code & code blocks

Wrap inline code in single backticks. For multi-line blocks, use triple backticks (a “fence”) or indent every line by four spaces. Adding a language name after the opening fence enables syntax highlighting on most platforms.

ElementMarkdown
Inline code`inline code`
Fenced code block```code``` (on its own lines)
Fenced with language```js```
Indented code blockfour leading spaces before each line

A fenced block with a language fence looks like this:

```js
function greet(name) {
  return `Hello, ${name}!`;
}
```

Tip: to show a literal backtick inside inline code, wrap it in a longer run of backticks, like code .

Blockquotes

Start a line with > to quote it. Add another > to nest quotes, and you can place other elements (lists, headings) inside a quote.

ElementMarkdownResult
Blockquote> Quoted text> Quoted text
Nested blockquote>> Nested quoteA quote inside a quote
Multi-paragraph quote> Para one then > then > Para twoTwo quoted paragraphs

Tables

Tables use pipes | to separate columns and a row of dashes --- to split the header from the body. Colons in the divider row set column alignment. The pipes don’t need to line up perfectly — the example below is spaced only for readability.

ElementMarkdown
Header row`
Divider row`
Data row`
Left align`
Center align`
Right align`

A complete table written out:

| Name  | Role    |
| :---- | ------: |
| Ada   | Author  |
| Linus | Builder |

Horizontal rules

A horizontal rule draws a divider line across the page. Use three or more of the same character on a line by itself, with a blank line above and below.

ElementMarkdownResult
Rule (dashes)---A horizontal divider
Rule (asterisks)***A horizontal divider
Rule (underscores)___A horizontal divider

Task lists

Task lists (checkboxes) are a GitHub Flavored Markdown feature, handy for to-do items in issues and pull requests. They’re an unordered list with [ ] or [x] after the marker.

ElementMarkdownResult
Unchecked task- [ ] To doAn empty checkbox
Checked task- [x] DoneA ticked checkbox

Tips & flavors

  • Flavors differ. Markdown has several dialects. The original is CommonMark; GitHub Flavored Markdown (GFM) extends it with tables, task lists, strikethrough, and automatic linking of URLs. Tools like GitLab, Reddit, Discord, and various static-site generators each support slightly different subsets.
  • Rendering varies by platform. A feature that works on GitHub may not work in a basic editor, and vice versa — when in doubt, preview your text where it will actually be published.
  • Raw HTML often works. Many parsers let you drop in HTML (for example <br> for a hard line break or <sub> / <sup>) when Markdown alone can’t express what you need, though some platforms strip it for safety.
  • Escape special characters with a backslash — for example \*not italic\* renders the asterisks literally instead of turning the text italic.