Some links in this article are affiliate links. We earn a commission at no extra cost to you when you purchase through them. Full disclosure.
Click any item to expand the syntax and rendered example. Markdown is used everywhere β from Git READMEs to documentation. For structured data, also see what is YAML.
π Text Formatting
Headings basics
# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4Use only one
# per page. Start sections with ##.
Bold, italic, strikethrough basics
**bold** *italic* ***bold and italic*** ~~strikethrough~~You can also use underscores:
_italic_ and __bold__, but asterisks are more common.
Blockquotes basics
> This is a quote. > > It can span multiple lines.Nested quotes:
Like this.
Horizontal rule basics
--- *** ___All three produce the same horizontal line.
π Links & Images
Links links
[Link text](https://example.com) [Link with title](https://example.com "Hover text")Reference-style (useful for repeated links)
Auto-link
Images links
! in front.
!β[Alt text](image.png) !β[Alt text](image.png "Optional title")Reference-style
!βScreenshot
With a link (clickable image)
[!βAlt](full-size.png)
π Lists
Unordered & ordered lists lists
# Unordered - Item one - Item two - Nested item (2 spaces indent) - Another nestedOrdered
- First
- Second
- Third
You can use all 1s (Markdown auto-numbers)
- First
- Second
- Third
Task lists / checkboxes lists
- [x] Write the code - [x] Write tests - [ ] Update docs - [ ] DeployOn GitHub, these render as interactive checkboxes in issues and PRs.
Definition lists lists
Term : Definition of the termAnother term : Its definition
π» Code
Inline code & code blocks code
# Inline Use `console.log()` to debug.Fenced code block with syntax highlighting
function greet(name) { return `Hello, ${name}!`; }Indented code block (4 spaces)
const x = 42;</pre>Common language tags:
javascript,typescript,python,bash,json,css,html,sql,yaml,diff
Diff syntax highlighting code
diff as the language for showing changes.
```diff - const old = "before"; + const new = "after"; ```Lines starting with
- show in red, + in green.
π Tables
Basic table table
| Name | Role | Status | |---------|-----------|--------| | Alice | Developer | Active | | Bob | Designer | Away |The dashes in the second row are required. Columns don't need to be aligned β it just looks nicer.
Column alignment table
| Left | Center | Right | |:-------|:-------:|------:| | text | text | text | | more | more | more |
:--- = left, :---: = center, ---: = right.
π§© Advanced / GitHub-Specific
Collapsible section advanced
<details> β works on GitHub and most renderers.
<details> <summary>Click to expand</summary>Leave a blank line afterHidden content goes here.
You can use Markdown inside.
</details>
<summary> for Markdown to render inside.
Footnotes advanced
Here is a statement[^1] with a footnote.
Alerts / callouts (GitHub) github
> [!NOTE] > Useful information.These render with colored icons on GitHub.[!TIP] Helpful advice.
[!IMPORTANT] Key information.
[!WARNING] Urgent info that needs attention.
[!CAUTION] Negative potential consequences.
Emoji github
:rocket: :white_check_mark: :warning: :x: :star: :fire: :bug: :memo: :tada: :construction: :recycle: :zap:Full list: GitHub emoji cheat sheet
Escaping special characters advanced
\*not italic\* \# not a heading \[not a link\] \`not code\`Characters you can escape:
\ ` * _ { } [ ] ( ) # + - . ! |
Quick access: Raycast lets you search commands, snippets, and cheat sheets instantly from your keyboard. Free for Mac.
Related: git cheat sheet Β· yaml cheat sheet Β· what is git