ReadmeCodeGen Logo

Markdown Cheat Sheet for GitHub

Quick reference guide for markdown syntax with GitHub-specific examples. Perfect for creating README files, documentation, and formatted text. Use this markdown cheat sheet to master headers, links, tables, code blocks, and more.

Headers

H1
# H1
H2
## H2
H3
### H3
H4
#### H4
H5
##### H5
H6
###### H6

Text Formatting

Bold text
**Bold text**
Italic text
*Italic text*
Bold and Italic
***Bold and Italic***
Strikethrough
~~Strikethrough~~
Inline code
`Inline code`
Highlight (GitHub)
==Highlight==

Lists

Unordered List
- Item 1
- Item 2
  - Nested item
  - Another nested item
- Item 3
Ordered List
1. First item
2. Second item
3. Third item
   1. Nested numbered item
   2. Another nested item
Task List (GitHub)
- [x] Completed task
- [ ] Incomplete task
- [x] Another completed task

Links & Images

Basic Link
[Link text](https://example.com)
Link with Title
[Link with title](https://example.com "Title")
Basic Image
![Alt text](image.jpg)
Image with Title
![Alt text](image.jpg "Image title")
Auto-link
<https://example.com>
Reference Link
[Reference link][1]

[1]: https://example.com

Code Blocks

Basic Code Block
```
code block
```
JavaScript Code Block
```javascript
const hello = 'world';
console.log(hello);
```
Python Code Block
```python
def hello_world():
    print('Hello, World!')
```
Indented Code Block
    // Indented code block
    const x = 42;

Tables

Basic Table
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1    | Data     | Data     |
| Row 2    | Data     | Data     |
Aligned Table
| Left | Center | Right |
|:-----|:------:|------:|
| L1   |   C1   |    R1 |
| L2   |   C2   |    R2 |

Blockquotes

Basic Quote
> This is a blockquote
Nested Quotes
> Nested quote
>> Double nested
>>> Triple nested
Multi-paragraph Quote
> **Note:** This is important
> 
> Multiple paragraphs in quote

Horizontal Rules

Three Dashes
---
Three Asterisks
***
Three Underscores
___

Special Elements

Escaped Characters
\*escaped asterisk\*
Collapsible Section
<details>
<summary>Click to expand</summary>
Hidden content
</details>
HTML Comment
<!-- This is a comment -->
Keyboard Keys
<kbd>Ctrl</kbd> + <kbd>C</kbd>
Footnotes
Text with footnote[^1]

[^1]: Footnote content

GitHub Flavored

Mention User
@username
Issue/PR Reference
#123
Emojis
:smile: :heart: :rocket:
Diff Code Block
```diff
+ Added line
- Removed line
```

💡 Pro Tips for README Files

Click the copy button next to any syntax to copy it to your clipboard!