#Writing Markdown
Inline formatting is applied within a paragraph using special characters:
| Result |
Syntax |
| Bold |
**text** or __text__ |
| Italic |
*text* or _text_ |
| Bold italic |
***text*** |
Strikethrough |
~~text~~ |
| Highlight |
==text== |
| Superscript E=mc2 |
E=mc^2^ |
| Subscript H2O |
H~2~O |
Inline code |
`code` |
#Headings
Headings are created with # symbols. The number of # symbols determines the level (1โ6):
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Every heading automatically gets a clickable anchor link โ a # symbol appears on hover. You can also assign a custom ID to any heading by appending {#your-id}:
## My Section {#my-section}
Link to it from anywhere in the document with [link text](#my-section).
#Paragraphs & Line Breaks
A blank line between text creates a new paragraph. A single line break within a paragraph is treated as a space. To force a line break within a paragraph, end the line with two spaces.
#Blockquotes
> This is a blockquote.
> It can span multiple lines.
>
> Even multiple paragraphs.
This is a blockquote.
It can span multiple lines.
Even multiple paragraphs.
#Horizontal Rules
A horizontal rule is created with three or more dashes on their own line:
---
#Lists
Unordered lists use -, +, or * followed by a space:
- First item
- Second item
- Nested item
- Another nested item
- Third item
- First item
- Second item
- Nested item
- Another nested item
- Third item
Ordered lists use numbers followed by a period:
1. First step
2. Second step
1. Sub-step A
2. Sub-step B
3. Third step
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
Task lists use - [ ] for an open item and - [x] for a checked item:
- [x] Completed task
- [ ] Open task
#Tables
Tables use pipe | characters to separate columns. The second row defines alignment using colons:
| Name | Role | City |
|-------|-----------|-----------|
| Alice | Developer | Amsterdam |
| Bob | Designer | Berlin |
| Name |
Role |
City |
| Alice |
Developer |
Amsterdam |
| Bob |
Designer |
Berlin |
For left alignment use |:---|, for right use |---:|, for center use |:---:|.
#Definition Lists
Definition lists use a term on one line followed by : definition on the next:
Markdown
: A lightweight markup language for formatting plain text.
HTML
: HyperText Markup Language, the standard markup language for web pages.
- Markdown
- A lightweight markup language for formatting plain text.
- HTML
- HyperText Markup Language, the standard markup language for web pages.
Define a footnote anywhere in the document with [^id]: text and reference it inline with [^id]:
Markdown was created by John Gruber[^gruber] in 2004.
[^gruber]: John Gruber published the original specification
on his blog [Daring Fireball](https://daringfireball.net/).
Markdown was created by John Gruber in 2004.
Footnotes are numbered automatically and collected at the bottom of the page (or section, in multisite documents).