以下内容均来自markdown tutorial lesson。
Header
Let’s take a look at another formatting convention: the header. Headers are frequently used on websites, magazine articles, and notices, to draw attention to a section. As their name implies, they act like titles or subtitles above sections. There are six types of headers, in decreasing sizes: (#号后有空格)
# Header one
## Header two
### Header three
#### Header four
##### Header five
###### Header six
Header one
Header two
Header three
Header four
Header five
Header six
To make headers in Markdown, you preface the phrase with a hash mark (#). You place the same number of hash marks as the size of the header you want. For example, for a header one, you’d use one hash mark (# Header One), while for a header three, you’d use three (### Header Three).
For this next lesson, make each header the right size.
Links
We’ll now learn how to make links to other web sites on the world wide web.
There are two different link types in Markdown, but both of them render the exact same way. The first link style is called an inline link. To create an inline link, you wrap the link text in brackets ( [ ] ), and then you wrap the link in parenthesis ( ( ) ). For example, to create a hyperlink to www.github.com, with a link text that says, Visit GitHub!, you’d write this in Markdown: Visit GitHub!. In the box below, make a link to www.google.com, with link text that says “Search for it.” Search for it.—use Baidu.
Images
If you know how to create links in Markdown, you can create images, too. The syntax is nearly the same. The difference is that an image is prefaced with an exclamation point ( ! ), followed by the same two brackets, and a pair of parentheses containing the image URL. Within the image brackets, you can place some “alt text,” which is a phrase or sentence that describes the image for the visually impaired. Images also have two styles, just like links. To create an inline image, you’ll use the same syntax as an inline link. In the box below, turn the link to an image, and fill out the alt text brackets to say “A representation of Octdrey Catburn”:

Wonderful!
You don’t need to add alt text, but it’s considered useful and polite to the visually impaired. You could just as well leave the boxes empty. For a reference image, you’ll follow the same pattern as a reference link. You’ll precede the Markdown with an exclamation point, then provide two brackets for the alt text, and then two more for the image tag. At the bottom of your Markdown page, you’ll define an image for the tag. In the box below, we’ve started placing some reference images; you’ll need to complete them, just like the last lesson. Call the first reference tag “First Father”, and make it link to http://octodex.github.com/images/founding-father.jpg; make the second image link out to http://octodex.github.com/images/foundingfather_v2.png.


Blockquotes
If you need to call special attention to a quote from another source, or design a pull quote for a magazine article, then Markdown’s blockquote syntax will be useful. A blockquote is a sentence or paragraph that’s been specially formatted to draw attention to the reader. For example: To create a block quote, all you have to do is preface a line with the “greater than” caret (>). For example: (>号后有空格,且他前面必须另起一行)
> I read this interesting quote the other day:
> "Her eyes had called him and his soul had leaped at the call. To live, to err, to fall, to triumph, to recreate life out of life!"
I read this interesting quote the other day:
“Her eyes had called him and his soul had leaped at the call. To live, to err, to fall, to triumph, to recreate life out of life!”
Lists
This tutorial is all about creating lists in Markdown. There are two types of lists in the known universe: unordered and ordered. That’s a fancy way of saying that there are lists with bullet points, and lists with numbers. To create an unordered list, you’ll want to preface each item in the list with an asterisk ( * ). Each list item also gets its own line. For example, a grocery list in Markdown might look like this:
* Flour
* Cheese
* Tomatoes
- Flour
- Cheese
- Tomatoes
Also:
* Calculus
* A professor
* Has no hair
* Often wears green
* Castafiore
* An opera singer
* Has white hair
* Is possibly mentally unwell
- Calculus
- A professor
- Has no hair
- Often wears green
- Castafiore
- An opera singer
- Has white hair
- Is possibly mentally unwell
Notice that the first two items have a single space. This looks a bit odd, so you might want to indent properly to match the characters up (like items three and four). In these paragraphs, you can include all sorts of other Markdown elements, like blockquotes, or even other lists!
In the box below, convert the bullet points into their own paragraphs.
1. Cut the cheese
* Make sure that the cheese is cut into little triangles.
2. Slice the tomatoes
* Be careful when holding the knife.
* For more help on tomato slicing, see Thomas Jefferson's seminal essay _Tom Ate Those_.
- Cut the cheese
- Make sure that the cheese is cut into little triangles.
- Slice the tomatoes
- Be careful when holding the knife.
- For more help on tomato slicing, see Thomas Jefferson’s seminal essay Tom Ate Those.
Paragraphs
You can accomplish this by inserting two spaces after each new line. This is not possible to see, since spaces are invisible, but it’d look something like this:*Each dot ( · ) represents a space on the keyboard.*
We pictured the meek mild creatures where··
They dwelt in their strawy pen,··
Nor did it occur to one of us there··
To doubt they were kneeling then.··
We pictured the meek mild creatures where
They dwelt in their strawy pen,
Nor did it occur to one of us there
To doubt they were kneeling then.
Congratulations!
You’ve completed all the lessons!
Believe it or not, we’ve only just begun exploring what can be accomplished with Markdown. There are many “extended” implementations of Markdown that support formats like tables, definition lists, footnotes, and more. Because they’re non-standard, they’re not essential to learning the basics, as we’ve introduced here.
If you’d like to know more about these Markdown implementations, you’re welcome to explore any number of other Markdown apps and tutorials. Here are just a few:
http://en.wikipedia.org/wiki/Markdown#Syntax_examples
http://spec.commonmark.org/dingus/
http://johnmacfarlane.net/babelmark2/faq.html
http://idratherbewriting.com/2013/06/04/exploring-markdown-in-collaborative-authoring-to-publishing-workflows/