Basic Markdown syntax

This post showcases the basic Markdown syntax in major Markdown editors.

Taken from:

  • Grav
  • Hugo LoveIt theme
  • Pandoc markdown

Headings

H1 heading # h1 Heading could mess up the table of contents so it is not shown.

1
2
3
4
5
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading

h2 Heading

h3 Heading

h4 Heading

h5 Heading
h6 Heading

Inline HTML

HTML tags are supported if you need a particular HTML tag or html comments.

1
2
3
4
5
6
7
8
9
10
11
12
Paragraph in Markdown.

<details>
<summary>Epcot Center</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>

Paragraph in Markdown.

<!--
This is a comment, you should not see me
-->

Paragraph in Markdown.

Epcot Center

Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.

Paragraph in Markdown.

Horizontal Rules

1
2
3

***


Emphasis

Bold, italics, and strikethrough can be used either indivisually or in combination.

1
2
3
4
5
6
7
8
9
10
11
**rendered as bold text**

__rendered as bold text__

*rendered as italicized text*

_rendered as italicized text_

~~Strike through this text~~

==Marking this text==

rendered as bold text

rendered as bold text

rendered as italicized text

rendered as italicized text

Strike through this text

Marking this text

Blockquotes

1
2
3
4
5
> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

> This is a block quote.
>
> > A block quote within a block quote.

Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

This is a block quote.

A block quote within a block quote.

Superscripts and subscripts

(Disabled in favor of latex math syntax)

1
H~2~O is a liquid.  2^10^ is 1024.

Lists

Unordered

1
2
3
4
5
6
7
8
9
10
11
12
* Lorem ipsum dolor sit amet
* Consectetur adipiscing elit
* Integer molestie lorem at massa
* Facilisis in pretium nisl aliquet
* Nulla volutpat aliquam velit
* Phasellus iaculis neque
* Purus sodales ultricies
* Vestibulum laoreet porttitor sem
* Ac tristique libero volutpat at
* Faucibus porta lacus fringilla vel
* Aenean sit amet erat nunc
* Eget porttitor lorem
  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Ordered

💡 If you just use 1. for each number, Markdown will automatically number each item.

1
2
3
4
5
6
7
8
1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
4. Facilisis in pretium nisl aliquet
5. Nulla volutpat aliquam velit
6. Faucibus porta lacus fringilla vel
7. Aenean sit amet erat nunc
8. Eget porttitor lorem
  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  4. Facilisis in pretium nisl aliquet
  5. Nulla volutpat aliquam velit
  6. Faucibus porta lacus fringilla vel
  7. Aenean sit amet erat nunc
  8. Eget porttitor lorem

Ordered but custom start number

1
2
3
4
5
6
 9)  Ninth
10) Tenth
11) Eleventh
i. subone
ii. subtwo
iii. subthree
  1. Ninth
  2. Tenth
  3. Eleventh i. subone ii. subtwo iii. subthree

Task lists

1
2
- [ ] an unchecked task list item
- [x] checked item

Markdown Code blocks

Inline monospace

1
`code here`

code here

Block fenced code, with syntax highlighting

1
2
3
```python
print("Hey!")
```
1
print("Hey!")

Tables

See tables generator for table syntax. Use use editors like typora or marktext to edit tables with ease.

1
2
3
4
5
| Option | Description |
| ------ | ----------- |
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
ext extension to be used for dest files.

Simple tables

(Pandoc only)

1
2
3
4
5
  Right     Left     Center     Default
------- ------ ---------- -------
12 12 12 12
123 123 123 123
1 1 1 1

Grid tables

(Pandoc only)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+

+---------------+---------------+--------------------+
| Right | Left | Centered |
+==============:+:==============+:==================:+
| Bananas | $1.34 | built-in wrapper |
+---------------+---------------+--------------------+

1
2
3
4
<https://assemble.io>
<contact@revolunet.com>
[Assemble](https://assemble.io)
[Upstage](https://github.com/upstage/ "Visit Upstage!")

https://assemble.io contact@revolunet.com Assemble Upstage

Footnotes

💡 Footnotes are automatically numbered.

1
2
3
4
5
This is a digital footnote[^1].
This is a footnote with "label"[^label]

[^1]: This is a digital footnote
[^label]: This is a footnote with "label"

This is a digital footnote[1] This is a footnote with "label"[2]

Keyboard strokes

Needs markdown-it-kbd.

1
[[Ctrl]] + [[Alt]] + [[Delete]]

Ctrl + Alt + Delete

Images

1
2
![Minion](https://octodex.github.com/images/minion.png)
![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")

Minion Alt text

You can attach images or documents to GitHub issues for free image hosting.

Math rendering

See math rendering.

Extended syntax

See extended syntax.


  1. This is a digital footnote ↩︎

  2. This is a footnote with "label" ↩︎