Monday, June 22, 2009


Markdown is a simple syntax for writing text documents. It is better than HTML since it does not contain as much clutter. HTML may be used in a Markdown document but block level elements must be surrounded with blank lines.


Headers come in two types.

  • Underlined headers, =====, and -----
  • Prefix headers, which uses # as prefix, # = h1, and ### = h3


  • Emphasis can be shown with * or with _ .
  • If you double them up they will become strong instead ** and __


  • Unordered lists are indicated with *, + or -
  • Ordered lists are indicated with number followed by period, 1.

Lists may be span several lines and may also use hanging indents. To wrap the list items in paragraphs simply leave a blank line between item lines.


Blockquotes are indicated by prefixing lines with >. They may be nested > > . If you only prefix the first line in a paragraph, everything up to the next blank line will be part of the blockquote.


Markdown produces literal markup if the lines are indented with one tab or four spaces. This kind of code will be wrapped with <pre><code>


Lines may be indicated by putting three or more asterisks (***) or hyphens (---) on a line by itself.


Markdown support both inline and reference links.

Inline links

  • Absolute [text for link](
  • Relative [text for link](relative_url)
  • With title [text for link](relative_url "my title")

Reference links

  • [text for link][anders]
  • Same text and id [anders][]

The referenced link ids must be defined somewhere else in the document like this:

[anders]: http:/ "Optional title"

The link definitions are inserted into the actual links and removed after the page is processed.

Automatic links

URLs surrounded with angle brackets <> are automatically inserted as links this may be used both for links and email:

  • <>
  • <>


Images are inserted with link syntax, preceded with an exclamation point !.

  • ![Alt text](/path/to/img.jpg)
  • ![Alt text](/path/to/img.jpg "Optional title")
  • ![Alt text][id]


Most of the Markdown special characters such as * and - may be escaped by preceding them with a backslash \.

1 comment:

Anonymous said...

Dear Author !
Quite right! Idea excellent, it agree with you.