Markdown Cheat Sheet – A quick reference to the Markdown syntax

Markdown is a way to style text on the web. You control the display of the document; formaing words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like # or *


# H1
## H2
### H3
#### H4
##### H5
###### H6
Alternatively, for H1 and H2, an underline-ish style:


**bold text**


*italicized text*


Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~


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


(In this example, leading and trailing spaces are shown with dots “⋅”)

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 (at least one, but we'll use three here to also align the raw Markdown).
⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
* Unordered list can use asterisks
- Or minuses
+ Or pluses

Definition Lists

 :  A semantic personal publishing platform
 :  Text-to-HTML conversion tool


There are two ways to create links.

[I'm an inline-style link](
[I'm an inline-style link with title]( "Google's Homepage")
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].
URLs and URLs in angle brackets will automatically get turned into links. or <> and sometimes (but not on Github, for example).


Inline Images

Logo: ![Alt](/wp.png "Title")
The “Alt” text (alternative text) makes images accessible to visually impaired

Referenced Images

Smaller logo: ![Alt][1]
[1]: /wp-smaller.png "Title"

Linked Images

Linked logo: [![alt text](/wp-smaller.png)]( "Title")


Inline code has back-ticks around it.

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

Code Block

This is a
piece of code
in a block
This too

Syntax highlighting

Markdown converts text with four leading spaces into a code block; with GFM you can wrap your code with “` to create a code block without the leading spaces. Add an optional language identifier and your code will get syntax highlighting.

#button {
    border: none;
var s = "JavaScript syntax highlighting";
s = "Python syntax highlighting"
print s
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.

Task Lists

- [x] this is a complete item
- [ ] this is an incomplete item
- [x] @mentions, #refs, [links](),
**formatting**, and <del>tags</del>
- [x] list syntax required (any unordered or ordered list supported)


Tables aren’t part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email — a task that would otherwise require copy-pasting from another application.

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.

Inline HTML

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

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

Horizontal Rule

Three or more...

YouTube Videos

They can’t be added directly but you can add an image with a link to the video like this:

<a href="
" target="_blank"><img src=""
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>

Or, in pure Markdown, but losing the image sizing and border:



 GitHub supports emoji!
 :+1: :sparkles: :camel: :tada:
 :rocket: :metal: :octocat:


Markdown converts text to HTML.

*[HTML]: HyperText Markup Language


I have more [^1] to say up here.
[^1]: To say down here.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *