The Ultimate Markdown Cheat Sheet: Your Comprehensive Guide
Your Ultimate Cheat Sheet | Dive into Markdown basics, GitHub Flavored Markdown (GFM), and R Markdown with clear examples. Master text formatting and document structuring for seamless content creation.
Markdown is your ticket to effortless text formatting and document structuring. Whether you're a writer, developer, or content creator, mastering Markdown is a game-changer. This comprehensive cheat sheet will cover the fundamentals, explore GitHub Flavored Markdown (GFM) enhancements, and introduce R Markdown's capabilities.
You can try markdown syntax by using our online markdown editor. Markdown Viewer
Common Markdown Tags
Here's a quick rundown of common Markdown tags and their usage:
Headers
# Heading 1
## Heading 2
### Heading 3
Emphasis (Italics and Bold)
_italic_ or _italic_
**bold** or **bold**
Lists (Ordered and Unordered)
- Unordered List Item 1
- Unordered List Item 2
1. Ordered List Item 1
2. Ordered List Item 2
Links
[FormatEasy](https://formateasy.com)
Images
![Alt text](image-url.jpg)
Code (Inline and Code Blocks)
Inline code: `inline code` Code block: ``` def greet(name): return f"Hello, {name/}!" ```
Blockquotes
> This is a blockquote.
Horizontal Rules
---
Line Breaks
This is a line
break.
Ordered and Unordered Lists with Sublists
1. First item
- Subitem A
- Subitem B
2. Second item
Tables
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1A | Cell 1B |
| Cell 2A | Cell 2B |
Links with Titles
[FormatEasy](https://formateasy.com 'Visit Format Easy')
Images with Alt Text and Titles
![Alt text](image-url.jpg 'Image Title')
Ordered and Unordered Lists with Checkboxes
- [ ] Task 1
- [x] Task 2 (completed)
Footnotes
Here's some text with a footnote[^1].
[^1]: This is the footnote text.
Strikethrough
~~Strikethrough~~
Superscript and Subscript
Superscript: 2^3^
Subscript: H~2~O
Definition Lists
Term 1
: Definition 1
Term 2
: Definition 2
Abbreviations
Markdown is often abbreviated as [MD]. \*[MD]: Markdown
Inline Comments
Here's some text <!-- with a comment --> that won't be visible when rendered.
Escaping Characters
To display an asterisk \* without formatting, use a backslash: \*.
Block-Level HTML
<div>
This is a block-level HTML element within Markdown.
</div>
Special Characters
© ©
® ®
GitHub Flavored Markdown (GFM)
GitHub adds extra flavor to Markdown:
Task Lists
- [ ] To-Do Item
- [x] Completed Item
Mentions
@username
#issue
Fenced Code Blocks with Syntax Highlighting
```python
def calculate(x, y):
return x + y
```
R Markdown
R Markdown brings Markdown and R code together:
R Code Chunks
```{r}
R code goes here
result <- 2 + 2 print(result) ```
HTML and LaTeX
R Markdown supports HTML and LaTeX for advanced formatting: ```{html}
<p>This is an HTML element.</p> ```
```{latex} (\sqrt{x^2 + y^2}) ```
With this comprehensive cheat sheet, you're armed with the knowledge to create beautifully formatted documents, blogs, and more. Happy Markdown-ing!