Basic Markdown syntax

This post showcases the basic Markdown syntax you’ll see in major Markdown editors.

Some are taken from Grav, Hugo LoveIt theme documentation.

The following sections will be

📄: documentation
💡: tips
🔨: tool

1
What you write in Markdown

What would be rendered

Headings

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
Paragraph in Markdown.

<div class="class">
This is <b>HTML</b>
</div>

Paragraph in Markdown.

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

Paragraph in Markdown.

This is HTML

Paragraph in Markdown.

Horizontal Rules

1
---

Emphasis

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

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

__rendered as bold text__

*rendered as italicized text*

_rendered as italicized text_

~~Strike through this text~~

rendered as bold text

rendered as bold text

rendered as italicized text

rendered as italicized text

Strike through this text

Blockquotes

1
2
3
4
> **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.

> One
> Two

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.

Multiline quotes

One
Two

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
1. Consectetur adipiscing elit
1. Integer molestie lorem at massa
1. Facilisis in pretium nisl aliquet
1. Nulla volutpat aliquam velit
1. Faucibus porta lacus fringilla vel
1. Aenean sit amet erat nunc
1. 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

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 syntax.

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.
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

markdown-it-kbd is needed.

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

It is actually easier to use absolute paths than relative ones in Hexo.

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

MathJax rendering

See Post not found: md-math math rendering.

Emojis

See Post not found: emoji emoji.


  1. This is a digital footnote ↩︎

  2. This is a footnote with “label” ↩︎