How to format posts on Lemmy using Markdown
Lemmy uses markdown-it for rendering markdown. This means that you can use the same markdown syntax that you would use on Lemmy and it follows the CommonMark spec. Here are some examples of markdown that you can use on Lemmy:
Headers
If you enter the following text:
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6Lemmy will render it as:


Markdown Headers
Emphasis
If you enter the following text:
_italic_
**bold**
**_bold italic_**
~~strikethrough~~Lemmy will render it as:


Markdown Emphasis
Lists
If you enter the following text:
- Unordered list item 1
- Unordered list item 2
- Unordered list item 2.1
- Unordered list item 2.2
- Unordered list item 3
1. Ordered list item 1
2. Ordered list item 2
3. Ordered list item 3Lemmy will render it as:


Markdown Lists
Links / Images
If you enter the following text:
[Link text](https://example.com)

Lemmy will render it as:


Markdown Links/Images
Blockquotes
If you enter the following text:
> Block
> -quoteLemmy will render it as:


Markdown Blockquotes
Code
If you enter the following text:
`inline code`
```python
def hello():
print("Hello, World!")
```Lemmy will render it as:


Markdown Inline/Blockcode
Tables
If you enter the following text:
| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Row 1 | Row 1 | Row 1 |
| Row 2 | Row 2 | Row 2 |
| Row 3 | Row 3 | Row 3 |Lemmy will render it as:


Markdown Tables
Note
Tables are not officially documented by Lemmy, but they are supported by the frontend.
Horizontal Rule
If you enter the following text:
Some text.
---
Some more text.Lemmy will render it as:


Markdown Horizontal Rule
Spoilers
If you enter the following text:
::: spoiler Spoiler Name
Spoiler Content
:::Lemmy will render it as:


Markdown Spoilers (closed)
The user can then toggle the spoiler to show the content:


Markdown Spoilers (open)
This is not supported by all apps
Some apps may not support this spoiler notation. In that case, the spoiler will be rendered as a regular blockquote.
Sub/Superscript
If you enter the following text:
H~2~O
H^2^OLemmy will render it as:


Markdown Spoilers (open)