Getting Started
Headers & Paragraphs
Use # for headers (1-6 levels). Alternative syntax uses === for H1 and --- for H2. Paragraphs need a blank line between them. Markdown is designed to be readable as plain text.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Alternative Heading 1
=====================
Alternative Heading 2
---------------------
This is a paragraph. Just write
plain text. Leave a blank line
between paragraphs.Line Breaks
Two trailing spaces or a backslash at the end of a line create a hard line break (<br>). Without them, a single newline is a soft wrap that joins into one paragraph. Always leave a blank line to separate paragraphs.
First line
Second line (two trailing spaces above)
Or use a backslash at end of line\
to force a line break.
Soft wrap without break:
just continue on the next line
and it joins into one.Comments
Markdown has no official comment syntax, but HTML comments (<!-- -->) work in most renderers and are hidden in output. The [//]: # trick uses an empty link reference to add notes. Comments are still visible in the raw source.
<!-- HTML comments work in most Markdown -->
[//]: # (This is a comment)
[//]: # "Another comment style"
<!--
Multi-line comment
not rendered in output
-->Whitespace & Indentation
Four leading spaces turn text into a code block — beware accidental indentation. Indentation matters for nested lists (2-4 spaces per level). Tabs are usually treated as 4 spaces. Use spaces consistently to avoid rendering issues across parsers.
Paragraph one.
This is an indented code block
because of 4 spaces.
> Quoted text needs > prefix.
Three spaces is just text
(less than 4).Horizontal Rules
Three or more hyphens, asterisks, or underscores create a horizontal rule (<hr>). Hyphens are most common. Spaces between characters are allowed. For clarity, put blank lines around horizontal rules. Avoid confusing --- (rule) with # (heading).
---
***
___
* * *
Text above
---
Text belowText Formatting
Bold & Strong
Double asterisks or underscores produce bold (<strong>). Asterisks are preferred since underscores do not work mid-word (snake_case). You can nest other emphasis inside bold. HTML <strong> tags work as a fallback.