Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

John Gruber

You can also convert markdown to tons of other formats, including PDF, using Pandoc.

I use Markdown as my primary format for all my notes, documentation and in various services.

Basics (which I use)

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. Normal paragraphs should not be indented with spaces or tabs.


Atx-style headers (h1, h2, h3, h4, h5, h6) are created by prefixing the line with # characters from one to six.

H1 header - # H1 header


Blockquotes are indicated using email-style > angle brackets.

This is a blockquote. - > This is a blockquote.


For phrase emphasis I use:

  • italic - *italic*
  • stroke - ~~stroke~~
  • bold - **bold**
  • highlight - \==highlight==
  • underline - <u>underline</u>
  • superscript - <sup>superscript</sup>
  • subscript - <sub>subscript</sub>
  • variable - <var>variable</var>
  • mark - <mark>mark</mark>
  • cite - <cite>cite</cite>
  • inserted - <ins>inserted</ins>

For lists, I use - as lists marker for unordered lists and 1. for ordered:

  • First item - - First item

  • Second item - - Second item

    This is paragraph between list items.

  • Third item - - Third item

    • Indented item - - Indented item
    • Indented item - - Indented item
      1. Indented item - 1. Indented item
      2. Indented item - 2. Indented item
  • Fourth item - - Fourth item

  1. First item - 1. First item
  2. Second item - 2. Second item
  3. Third item - 3. Third item
    1. Indented item - 1. Indented item
    2. Indented item - 2. Indented item
  4. Fourth item - 4. Fourth item

Tables can be created using | and ---:

Formatting:

foobar
barfoo
| foo | bar |
| --- | --- |
| bar | foo |

Minimal syntax:

foobar
barfoo
|foo|bar|
|-|-|
|baz|bim|

Extra

Escape backtick character: `, List`1

Here’s a simple footnote,1 and here’s a longer one.2

You can also use inline footnotes. ^[notice that the carat goes outside of the brackets on this one.]

Footnotes

TODO

Footnotes

  1. meaningful!

  2. Here’s one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    { my code }

    Add as many paragraphs as you like.