Close
Close full mode
logoBooGi

Markdown cheatsheet

Git RepositoryEdit on Github
Last update: a month ago by Mateusz FilipowiczReading time: 4 min

Headers

# Header Level 1
## Header Level 2
### Header Level 3
#### Header Level 4
##### Header Level 5
###### Header Level 6

H1

H2

H3

H4

H5

H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

Alt-H2

You can also specify header ID:

Hello {#id}
-----

Hello {#id}

Emphasis

Italics (emphasis): *asterisks* or _underscores_.
Bold (Strong emphasis): **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough: ~~Scratch this.~~

Italics (emphasis): asterisks or underscores. Bold (Strong emphasis): asterisks or underscores. Combined emphasis with asterisks and underscores. Strikethrough: Scratch this.

Lists

1. First ordered list item
2. Another item
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
4. And another item.
You can have properly indented paragraphs within list items. Notice the blank
line above, and the leading spaces.
* Unordered list can use asterisks
- Or minuses
+ Or pluses
  1. First ordered list item

  2. Another item

    • Unordered sub-list.
  3. Actual numbers don't matter, just that it's a number

    1. Ordered sub-list
  4. And another item.

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces.

  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

Images

Here's our logo (hover to see the title text):
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/
common/images/icon48.png "Logo Title Text 1")
Reference-style:
![alt text][logo]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/
common/images/icon48.png "Logo Title Text 2"

Here's our logo (hover to see the title text):

Inline-style: alt text

Reference-style: alt text

Code and syntax highlighting

Inline `code` has `back-ticks around` it.

Inline code has back-ticks around it.

Code blocks:

```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
```
var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
public static int getDate(String enum) {
return null;
}
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.

Tables

Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Colons can be used to align columns.

TablesAreCoolTablesAreCool
col 3 isright-aligned$1600col 3 isright-aligned$1600
col 2 iscentered$12col 2 iscentered$12
zebra stripesare neat$1zebra stripesare neat$1

There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

MarkdownLessPretty
Stillrendersnicely
123

Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps.
Oh boy let's keep writing to make sure this is long enough to actually
wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.

Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

Inline HTML

You can also use raw HTML in your Markdown, and it'll mostly work pretty well.

<dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>

Horizontal rule

Three or more...
---
Hyphens
***
Asterisks
___
Underscores

Three or more...


Hyphens


Asterisks


Underscores

Footnotes

This is some text.1. Other text.footnote.

Abbreviations

This is some text not written in HTML but in another language!

{:.mega-big}

Definition lists

kramdown : A Markdown-superset converter

Maruku : Another Markdown-superset converter

{:#term} Term with id="term" : {:.cls} Definition with class "cls"

{:#term1} First term {:#term2} Second term : {:.cls} Definition

EOB

  • list one ^
  • list two

Inline classes

This is{:.underline} some code{:#id}{:.class}. A link{:rel='something'} and some tools{:.tools}.%


  1. Some crazy footnote definition.

  2. Blockquotes can be in a footnote.

    as well as code blocks

    or, naturally, simple paragraphs.

✍️ Editing Content — Previous
Adding images
Next — 💻 Developing
Running Locally