Writing your document with Markdown >


A quick introduction to Markdown syntax

You can learn most of what there is to know about Markdown syntax in less than 10 minutes although like everything else, it helps to practise. Below is a short overview of the Markdown syntax that you are most likely to use. Note that many commands have alternative symbols and sometimes syntax to achieve the same thing. Also, the formatter used 'under the hood' by MarkupBinder, 'Pandoc', has many useful enhancements and alternative syntax to make writing with Markdown even easier. A relevant extract from the Pandoc 'Readme' page is also included later in this manual.

Paragraphs

Markdown treats a paragraph as lines of text surrounded by blank lines. Therefore, the lines:

This is some text.
This is some more text.

This is even more text.
And lots more text.

would, after formatting, look like this:

This is some text. This is some more text.

This is even more text. And lots more text.

Headings

Insert one to six hashes '#' at the beginning of a line followed by a space for heading levels 1 to 6 like this:

# This is heading level one

### This is heading level three

would, after formatting, look like this:

This is heading level one

This is heading level three

The actual size of these headlines will be determined by the HTML style sheet.

Italic Text

*Text surrounded by one asterisk becomes italic*

Like this:

Text surrounded by one asterisk becomes italic

Bold Text

**Text surrounded by two asterisks becomes bold**

Like this:

Text surrounded by two asterisks becomes bold

Make links like this: [link text](url)
For example: [Click here for Google](http://www.google.com)

would look after formatting like this:
Click here for Google

Bulleted Lists

To make bulleted lists, put an asterisk '*' before each bullet item followed by a space; for example, typing this:

* Bulleted list item 1  
* Bulleted list item 2   
* Bulleted list item 3

becomes this after formatting:

Have a bulleted list with another level of items? Just insert four or more spaces before the asterisk, for example:

* Bulleted list item 1
    * Sub item 1
    * Sub item 2
    * Sub item 3
* Bulleted list item 2
* Bulleted list item 3

becomes this after formatting:

Numbered Lists

If you start a line with a number and a period (fullstop), Markdown assumes you are making a numbered list; for example:

1. Numbered list item 1
2. Numbered list item 2
3. Numbered list item 3

becomes this after formatting:

  1. Numbered list item 1
  2. Numbered list item 2
  3. Numbered list item 3

Markdown keeps it’s own count, so even if you accidently type the wrong number, Markdown will correct it.

One problem you may run into is Markdown assuming you want to make a numbered list when you don’t. If you don’t want to make a numbered list, but you are starting a line with a number followed by a period, do it as follows:

1\. The backslash tells Markdown to ignore this (removing the backslash for you)

It will look like this:

1. The backslash told Markdown to ignore this (removing the backslash for you)

Hard Returns (be sure to read this)

In regular text (not bulleted lists), Markdown does not automatically insert a linebreak between two consecutive lines unless you put in a hard return (two blank spaces after the line). You don’t need to do this if there is an empty line between paragraphs, but you may find yourself having to do it if you are entering an address or something similar. For example:

John Smith<- put two blank spaces here
23 Spring Road<- put two blank spaces here
Manchester M56<- put two blank spaces here
UK

If you don’t put in two blank spaces, then the line will just print as:

John Smith 23 Spring Road Manchester M56 UK

Horizontal Rule

If you want to put a large horizontal line across the entire page, just enter three or more asterisks on the same line, like this:

*****

This line of asterisks becomes this:


Block Quotes

Want to offset a quote in your body of your text? Simply put a “>” as the first character in the line. You may be used to seeing this character used as identifying a quote in your email program. Here is an example of how to use it:

> "Live long and prosper." - Spock

becomes this after formatting:

"Live long and prosper." - Spock

Visit John Gruber's Markdown website for more details


[ Next - Pandoc Markdown vs standard Markdown ]

[ Previous - What is Markdown ]

[ Up - Writing your document with Markdown - Section ]

[ Up 2 - MarkupBinder Manual - Main Index ]