Markdown syntax cheatsheet

This is a brief but hopefully useful Cheatsheet for Markdown syntax. It isn’t comprehensive but has the most frequently used markdown that I use in my docs. It is a work in progress and is added to as I get around to doing it.

Headers

# Header one
## Header two
### Header three
#### Header four
##### Header five
###### Header six

Comments

Text can be commented out using the <!-- --> syntax:

<!--
This is some text I want commented out for the time being. 
-->

Paragraphs (Body text)

Paragraphs can be added simply by entering some text then putting a blank line between the paragraphs:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr.

Lorem ipsum dolor sit amet, consetetur sadipscing.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr.

Lorem ipsum dolor sit amet, consetetur sadipscing.

Font styling

Bold, emphasis and strikethrough are added using:

**bolded word**
*emphasized word*
~~strikethrough word~~

bolded word emphasized word strikethrough word

Inline HTML

Markdown accepts inline HTML including classes and inline styles. The following shows inserting an image using HTML:

<img class="post-image" src="path/to/image.pnd" alt=" Alt text" />

Horizontal Rules

An <hr> element can be added quickly using:

___ (three underscores)
--- (three dashes)
*** (three asterisk)

Links are added using the following syntax:

[Description of the link](Path to the link)

To add a tooltip to the link use the following syntax:

[Description of the link](Path to the line "Tooltip added here")

Images

Images can be added using HTML or markdown. In markdown use the following syntax:

![Description of the image](path/to/image.png "Alt text")
<img class="post-image" src="path/to/image.pnd" alt=" Alt text" />

Blockquote

Single line blockquote

> Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Multi-line blockquote

> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Tables

Tables can be inserted using HTML or Markdown. In Markdown, use the following syntax:

| Heading  | Heading |
|  ---     |   ----  |
| Cell     | Cell    |
Heading Heading
Cell Cell

List of items

Unordered Lists (Nested)

You can use *, - or + as valid bullet symbols.

- List item one
  - List item one
  - List item two
  - List item three
  - List item four
- List item two
- List item three
- List item four
  • List item one
    • List item one
    • List item two
    • List item three
    • List item four
  • List item two
  • List item three
  • List item four

Ordered List (Nested)

Markdown renders an ordered list if the item begins with a number followed by a period and space. You can use 1. and it will render into an order list.

1. List item one
   1. List item one
   1. List item two
   1. List item three
   1. List item four
1. List item two
1. List item three
1. List item four
  1. List item one
  2. List item one
    1. List item one
    2. List item two
    3. List item three
    4. List item four
  3. List item two
  4. List item three
  5. List item four

Code

Inline Code

Snippets of code within a sentence can be rendered using back ticks.

This is a sentence that contains `code` inside the sentence.

This is a sentence that contains code inside the sentence.

Code snippets with syntax highlighting

Markdown flavours support many language snippets. A code snippet is added using three back ticks (```) followed by the language renderer, such as Ruby, Python, Bash, Markdown and ends with three back ticks.

   # Print Hello World
   print("Hello World")

More information