End a line with two spaces to add a
How do I love thee?`[SPACE][SPACE]`
Let me count the ways
Italics and Bold
*This is italicized*, and so is _this_.
**This is bold**, and so is __this__.
Use ***italics and bold together*** if you ___have to___.
There are three ways to write links. Each is easier to read than the last:
Here's an inline link to [Google](http://www.google.com/).
Here's a reference-style link to [Google].
Here's a very readable link to [Yahoo!][yahoo].
The link definitions can appear anywhere in the document -- before or
after the place where you use them. The link definition names
[yahoo] can be any unique string, and are case-insensitive;
the same as
Links can have a title attribute, which will show up on hover. Title
attributes can also be added; they are helpful if the link itself is not
descriptive enough to tell users where they're going.
Here's a [poorly-named link](http://www.google.com/ "Google").
Never write "[click here][^2]".
(Advice against the phrase "click here")
[web]: http://tiwun.com/ "Tiwun"
Underline text to make the two
<h2> top-level headers:
The number of
- signs doesn't matter; one will work. But using
enough to underline the text makes your titles look better in plain text.
Use hash marks for several levels of headers:
# Header 1 #
## Header 2 ##
### Header 3 ###
The closing # characters are optional.
Insert a horizontal rule
<hr/> by putting three or more hyphens,
asterisks, or underscores on a line by themselves:
Using spaces between the characters also works:
- - - -
- Use a minus sign for a bullet
+ Or plus sign
* Or an asterisk
1. Numbered lists are easy
2. Markdown keeps track of the numbers for you
7. So this will be item 3.
A double-spaced list:
- This list gets wrapped in <p> tags
- So there will be extra space between items
Advanced lists: Nesting
To put other Markdown blocks in a list; just indent four spaces for each
1. Lists in a list item:
- Indented four spaces.
* indented eight spaces.
- Four spaces again.
2. Multiple paragraphs in a list items:
It's best to indent the paragraphs four spaces
You can get away with three, but it can get
confusing when you nest other things.
Stick to four.
We indented the first line an extra space to align
it with these paragraphs. In real use, we might do
that to the entire list so that all items line up.
This paragraph is still part of the list item, but it looks messy to humans. So it's a good idea to wrap your nested paragraphs manually, as we did with the first two.
3. Blockquotes in a list item:
> Skip a line and
> indent the >'s four spaces.
4. Preformatted text in a list item:
Skip a line and indent eight spaces.
That's four spaces for the list
and four to trigger the code block.
> to the beginning of any line to create a
> The syntax is based on the way email programs
> usually do quotations. You don't need to hard-wrap
> the paragraphs in your blockquotes, but it looks much nicer if you do. Depends how lazy you feel.
Advanced blockquotes: Nesting
To put other Markdown blocks in a
<blockquote>, just add a
by a space:
> The > on the blank lines is optional.
> Include it or don't; Markdown doesn't care.
> But your plain text looks better to
> humans if you include the extra `>`
> between paragraphs.
Blockquotes within a blockquote:
> A standard blockquote is indented
> > A nested blockquote is indented more
> > > > You can nest to any depth.
Lists in a blockquote:
> - A list in a blockquote
> - With a > and space in front of it
> * A sublist
Preformatted text in a blockquote:
> Indent five spaces total. The first
> one is part of the blockquote designator.
Images are exactly like links, but they have an exclamation point in
front of them:
The word in square brackets is the alt text, which gets displayed if the
browser can't show the image. Be sure to include meaningful alt text for
Just like links, images work with reference syntax and titles:
This page is ![valid XHTML][checkmark].
"What are you smiling at?"
Note: Markdown does not currently support the shortest reference syntax for images:
Here's a broken
But you can use a slightly more verbose version of implicit reference names:
The reference name is also used as the alt text.
URLs can be relative or full.
Need More Detail?
Visit the official Markdown syntax reference page.