Markdown is a simple way to write formatted text for publishing on the internet. It’s designed to be easy to write and be highly readable just as written, as well as capable of being formatted into good looking web pages. Markdown is available to use on many popular websites like Reddit, Tumblr and Posterous, and is also available for WordPress as a plug-in.
A simple example of Markdown: to emphasize text by putting it in italics, surround it with asterisks.\n If you write *this*, it will appear in your formatted web page like this.
Here we see the basic idea of Markdown. It allows you to write the way you would naturally to emphasize something in plain text, for example in an email, and that natural form then gets converted into a format suitable for more polished online writing.
Paragraphs, Italics and Bold
Paragraphs in Markdown are separated by blank lines, just as in a text note or email. You write as many sentences as you want, and then simply leave one or more empty lines before starting your next paragraph. However, don’t indent any of your paragraphs, as doing that can have special meaning in Markdown.
As we have seen, to write something in italics, just put asterisks around it, like so: *something in italics*.
To write something in bold, use double asterisks, like so: **something in bold**
There are several ways to include links, but here we’ll only cover one way, so there’s less to remember. For a link, you need to specify two things, the “anchor text” that will appear on your own page, and the web address of the page that the link points to.
In Markdown, this is done by putting the anchor text in square brackets, immediately followed by the web link in round brackets. For example a link to the original Markdown documenation can be written as:
[the original Markdown documenation](http://daringfireball.net/projects/markdown/syntax)
If you want to see different ways of writing links in Markdown, try that link to Daring Fireball above! (Daring Fireball is the website of Markdown’s inventor, John Gruber.)
As with links, there are several ways to create section headings in Markdown, but for simplicity we’ll only cover one. To make a heading of a certain level, simply prefix the text of the heading with that number of hash signs. Normally the title of your page or article will have a heading level 1, so the largest heading you’ll use in the body of your text will be level 2.
On this site headings of different levels look like this:
This is a heading level 2
This is heading level 3
This is a heading level 4
You can go down as far as level 6, but there is rarely a need to go that far.
The Markdown that made the above headings was, as you’d expect:
## This is a heading level 2
### This is heading level 3
#### This is a heading level 4
In keeping with Markdown’s philosophy, you write lists the way you’d naturally write them in an email or a text note, and Markdown takes care of formatting.
This is a bulleted list
You can make one by starting your line with a dash
And the Markdown to create the list above was:
- This is a bulleted list
- You can make one by starting your line with a dash
Numbered lists are just as easy. Start your line with a number – and it doesn’t matter if you put the right numbers in the right orders.
This is item one
This is the middle item
This is the last item
The list above was made by the Markdown below. Notice we were able to number all the points “1” and let Markdown figure out the right numbers. That can be helpful when you start editing lists, moving things around and inserting new items, as there is no need to keep renumbering things manually.
1. This is item one
1. This is the middle item
1. This is the last item
If you want to learn about more complicated lists, for example lists-of-lists, or lists where there are several paragraphs in each list item, read the Markdown documentation .
Footnotes are not included in normal Markdown, but are a feature of Markdown Extra.1
Making a footnote involves two parts, the footnote reference, and the footnote text itself. A footnote reference takes the form: [^something]. The something can be any text, such as a number, word or name. The only thing that matters is that no two footnotes use the same something as a reference.
Then to define the footnote itself, in a separate paragraph write:
[^something]: whatever text you want to appear as the footnote.
For example the footnote reference in the first line of this section was created by writing: [^1].
And the footnote text by writing:
[^1]: Markdown Extra was created by [Michel Fortin](http://michelf.com/projects/php-markdown/extra/).
If you want to learn more about Markdown than is explained here, or just want to see more examples of it, try these sites:
Full Markdown Syntax from Daring Fireball
Note that these sites assume some knowledge of HTML, so if you don’t know any HTML at all, some parts of them may not be understandable to you.
Products you may be interested in: