Markdown Syntax
Examples of markdown and the resulting output.
Headings
# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading .md
h1 Heading
h2 Heading
h3 Heading
h4 Heading
h5 Heading
h6 Heading
Styling Text
This is **bold text**
This is _italic text_
This is ~strikethrough text~
This is **_bold & italic text_**
This is <sub>subscript text</sub>
This is <sup>superscript text</sup>
This is <ins>underline text</ins> .md
This is bold text
This is italic text
This is strikethrough text
This is bold & italic text
This is subscript text
This is superscript text
This is underline text
Links
This is an [internal link](/docs)
This is an [external link](https://sveldocs.com) .md
This is an internal link
This is an external link
Line Breaks
This is a\\
line break .md
This is a
line break
Lists
Unordered List
- First
- Second
- Third .md
- First
- Second
- Third
Ordered List
1. First
2. Second
3. Third .md
- First
- Second
- Third
Nested List
1. First
- This explains the first
2. Second
- This explains the second
3. Third
- This explains the third .md
- First
- This explains the first
- Second
- This explains the second
- Third
- This explains the third
Task List
- [x] Complete
- [ ] Pending .md
- Complete
- Pending
Quote Blocks
Quoting Text
> This is a quote block example .md
This is a quote block example
Quoting Code
This is `quoted code` .md
This is quoted code
Quoting Code Blocks
This is a code block:
```ts
var str: string = 'hello world';
console.log(str);
``` .md
This is a code block:
var str: string = 'hello world';
console.log(str); .ts
Tables
| Left-aligned | Center-aligned | Right-aligned |
| :----------- | :------------: | ------------: |
| 1 | 2 | 3 |
| 4 | 5 | 6 | .md
Footnotes
Footnote[^first].
Footnote[^second].
[^first]: This links to the Footnote 1
[^second]: This links to the Footnote 2 .md
Alerts
Alerts are components to increase their customizability. View how to use them here.
import Alert from '$ui/alert';
<Alert type="note">This is a note alert.</Alert>
<Alert type="tip">This is a tip alert.</Alert>
<Alert type="warning">This is a warning alert.</Alert>
<Alert type="caution">This is a caution alert.</Alert> .svelte
Note
This is a note alert.
Tip
This is a tip alert.
Warning
This is a warning alert.
Caution
This is a caution alert.