Begin each line with a >
sign.
> This is my blockquote > and a second line ...
Other span and block elements are allowed inside a blockquote block as long as you
begin every line by >
. The possible indentation of the included block begin after
this sign.
> My citation > > With a paragraph and some `code` > > and even a preformatted string
Pre-formatted content are constructed by beginning each line with 4 spaces.
// this is my "pre" block $var = val_fct();
Alternatly, you can write some fenced code blocks surrounding them by lines of 3 or more tildes ~
.
~~~~ My code here ~~~~
To build some definitions lists, just write each term on a seperate line, and each definition on a new line, beginning with colon followed by 3 or more spaces.
You can write many definitions for a single term.
Word : Definition content (first one) with a two-lines text : Second definition for this term...
Markdown supports two styles of headers, Setext and atx.
First-level titles are underlined by equal signs and second level by dashes.
my title level 1 ================ my title level 2 ----------------
Prefix title with one or more hash marks, the number increases the title level.
# my title level 1 ### my title level 3
Write 3 or more hyphens -
, asterisks *
or underscores _
on a line.
My end of a paragraph .... ---- And this is my rest ...
Begin each entry by an asterisk *
, a plus +
or an hyphen -
followed by 3 spaces.
- first item - second item
Each item must be on a separate line. You can write sub-items indenting these entries.
- first item - second item - first sub-item - second sub-item
To build an ordered list, begin each entry by a number followed by a period and 3 spaces (the order of the written entries is not important).
1. first item 1. second item
Other span and block elements are allowed inside each list item as long as you indent all these blocks.
A paragraph is just some consecutive lines of text, wrapped between blank lines (or equivalent).
This is my first paragraph. And this is my second, on two lines ...
This means that if you want to see a line-break, you will have to write it litterally :
This is a paragraph. <br />with a line-break ...
Tables are constructed by visual resemblance. The first line (the headers) and the second one (the separator) are required.
[an optional caption] | First Header | Second Header | Third Header | | ------------- | ------------: | :----------: | | Content Cell | Content right-aligned | Content center-aligned | | Content Cell | Content on two columns ||
will produce:
First Header | Second Header | Third Header |
---|---|---|
Content Cell | Content right-aligned | Content center-aligned |
Content Cell | Content on two columns |
Use colons around seperate line to manage alignment of a column (colon on the right is right-aligned, on the left is left-aligned and on both sides is center-aligned). Tables can have many lines of headers and many body sections by passing a blank line between them.
Abbreviations are written like references, beginning by an asterisk *
.
A paragraph with the word HTML. *[HTML]: Hyper-Text Markup Language
Abbreviations are automatically replaced in text as they are defined anywhere in the document.
Write your anchor ID between curly brackets.
A paragraph with [a link]{#anchor} in context.
will reach, anywhere in a title of the page:
## my title {#anchor}
Anchors can just be set on titles.
Emphasis is written by surrounding word or expression between asterisks *
or underscores _
.
Bold text takes 2 of them.
**my content** or __my content__
Italic text takes only one of them.
*my content* or _my content_
Expressions or terms with underscores in emphasis span will be escaped.
"_my_underscored_content_"
will produce:
"*my_underscored_content*" and not "*my* underscored *content*"
Footnotes are written like references, with an ID beginning by a circumflex ^
.
A paragraph with the a footnote[^footnote_one] note. [^footnote_one]: Footnote content
Footnotes can be listed at the end of each block. Just use [^id]
in content.
Other span and block elements are allowed inside a footnote block as long as you do not pass a blank line.
You can create a glossary or a bibliography using features of Special Notes.
Embedded images followed almost the same syntax rule as links:
this is my image: 
The URL can be absolute or relative. References can be used to make your content more readable.
Hypertext links this rule:
There is my text with [an hypertext link](http://example.com/ "Optional link title") you can follow ...
The URL can be absolute or relative. References can be used to make your content more readable.
Markdown will automatically transform URLs or email addresses in "href" or "mailto" links.
My paragraph with a link to <http://example.com/> and an email <address@email.com> to contact.
will produce:
My paragraph with a link to <a href="http://example.com/">http://example.com/</a> and an email <a href="mailto:address@email.com">address@email.com</a> to contact.
Email addresses are automatically anti-spammed.
As Markdown is based on simple syntax wrapping parts of content between special signs,
to use them literally, these signs must be escaped with a backslash \\
:
| \\
backslash | \.
dot | \!
exclamation point | \#
hash mark |
| \*
asterisk | \+
plus sign | \-
hyphen | \_
underscore |
| \`` backtick quote |
()parentheses |
[]brackets |
{}` curly brackets |
You can use references for links or images. This allows you to write some more easy-to-read content by writing the attributes of the element after this content.
A paragraph with a referenced [hypertext link][myid] and some more text embedding an image: ![image for the test][myimage]. [myid]: http://example.com/ "Optional link title" [myimage]: http://example.com/test.com "Optional image title" width=40px height=40px
References are basically constructed by writting the ID of the definition in content and this definition anywhere in the document, on a single line, with no space to begin and writting first the ID between brackets followed by a colon and the classic definition of the object.
This way you can write all your references at the end of your document, for example, and make multi-calls of each reference.
The references allows you to add some attributes for the generated tag. Just write them at the end of the reference line.
You can construct a glossary or a bibliography by using special footnotes.
Glossary notes are constructed like a footnote, except that the first line of the note
will contain glossary:
followed by the term defined. The associated definition has to be
placed on a second line.
A paragraph with a referenced [glossary term][^myterm] ... [^myterm]: glossary: the term defined (an optional sort key) The term definition ... which may be multi-line.
Bibliography notes are constructed like a glossary, except that their IDs begins by a
sharp #
and the in-text call may contain two parts.
This is a statement that should be attributed to its source [p. 23][#Doe:2006]. [#Doe:2006]: John Doe. *Some Big Fancy Book*. Vanity Press, 2006.