Basic Syntax
Learn the fundamental markdown syntax for creating formatted text documents.
Headings
Create headings using the # symbol. The number of # symbols determines the heading level.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Paragraphs
Create paragraphs by writing text with blank lines between them.
This is the first paragraph.
This is the second paragraph with multiple sentences.
It will be rendered as a single paragraph.
This is the third paragraph.This is the first paragraph.
This is the second paragraph with multiple sentences. It will be rendered as a single paragraph.
This is the third paragraph.
Text Formatting
Bold
Make text bold using ** or __:
**This text is bold**
__This is also bold__This text is bold This is also bold
Italic
Make text italic using * or _:
*This text is italic*
_This is also italic_This text is italic This is also italic
Bold and Italic
Combine bold and italic:
***Bold and italic***
**_Also bold and italic_**
*__Still bold and italic__*Bold and italic Also bold and italic Still bold and italic
Strikethrough
Strike through text using ~~:
~~This text is struck through~~This text is struck through
Blockquotes
Create blockquotes using the > symbol:
> This is a blockquote.
> It can span multiple lines.
> You can also have multiple paragraphs.
>
> Like this.This is a blockquote. It can span multiple lines.
You can also have multiple paragraphs.
Like this.
Nested Blockquotes
> This is the first level.
>> This is nested.
>>> This is deeply nested.This is the first level.
This is nested.
This is deeply nested.
Horizontal Rules
Create horizontal rules using three or more -, *, or _:
---
***
___Inline Code
Highlight inline code using backticks:
Use the `console.log()` function to print output.Use the console.log() function to print output.
Line Breaks
Create a line break by ending a line with two or more spaces, or use a backslash \:
This is the first line.
This is the second line.
This is another line.\
With a break using backslash.This is the first line.
This is the second line.
This is another line.
With a break using backslash.
Escaping Characters
Escape markdown characters using a backslash \:
\*This is not italic\*
\[This is not a link\]Result: Text appears with literal asterisks and brackets, not formatted as markdown.
Comments
HTML comments work in markdown:
<!-- This is a comment and won't be visible -->Note: HTML comments will not be visible in the rendered output.