Basic Syntax
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages.
Headings
# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
###### Heading level 6
Emphasis
*Italic text*
_This is also italic_
**Bold text**
__This is also bold__
***Bold and italic***
___Also bold and italic___
Lists
Unordered lists:
- Item 1
- Item 2
- Subitem 2.1
- Subitem 2.2
- Item 3
Ordered lists:
1. First item
2. Second item
3. Third item
Links
[Link text](https://www.example.com)
[Link with title](https://www.example.com "Title")
Images


Blockquotes
> This is a blockquote
> It can span multiple lines
>
> It can also have multiple paragraphs
Code
Inline code:
Use the `print()` function
Code blocks:
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```
Extended Syntax
Many Markdown processors support extended syntax elements.
Tables
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Task Lists
- [x] Task 1 (completed)
- [ ] Task 2 (not completed)
- [ ] Task 3
Footnotes
Here's a sentence with a footnote[^1].
[^1]: This is the footnote.
Strikethrough
~~Strikethrough text~~
Definition Lists
term
: definition
Tips and Tricks
Line Breaks
To create a line break, end a line with two or more spaces, then type return.
Escaping Characters
Use a backslash to escape Markdown formatting characters:
\*This is not italic\*
HTML in Markdown
Most Markdown processors allow you to use HTML tags in your Markdown:
This is a paragraph with <span style="color: red;">red text</span>.
Linking to Headings
You can create links to headings in your document:
[Link to heading](#heading-id)
Remember that heading IDs are automatically generated by converting the heading text to lowercase and replacing spaces with hyphens.
Using Emojis
Many Markdown processors support emoji shortcodes:
:smile: :heart: :thumbsup:
This guide covers the most common Markdown syntax elements. For more detailed information, check out the Markdown Guide.