Markdown Syntax Help

1. Code and Preformatted Text

Indent four spaces to create an escaped <pre><code> block:

    printf("goodbye world!");  /* his suicide note
                                  was in C */

The text will be wrapped in tags, and displayed in a monospaced font. The first four spaces will be stripped off, but all other whitespace will be preserved.

Markdown and HTML is ignored within a code block:

    <blink>
       You would hate this if it weren't
       wrapped in a code block.
    </blink>

2. Fenced Code Blocks

Fenced code blocks are like Markdown’s regular code blocks, except that they’re not indented.

The code block start with a line containing three or more tilde ~ characters, and ends with the first line with the same number of tilde ~.

~~~
printf("goodbye world!");  /* his suicide note
                              was in C */
~~~

3. Syntax Highlighted Source Code

Code can be highlighted for a particular language by adding [lang] after the intial tilde ~ fence.

~~~
[php]
echo 'hello world';
~~~

Available langauges include: css, html, javascript, php, java, sql, ruby, xml, perl, python, and more.

4. Code Spans

Use backticks to create an inline <code> span:

Press the `<Tab>` key, then type a `$`.

(The backtick key is in the upper left corner of most keyboards.)

Like code blocks, code spans will be displayed in a monospaced font. Markdown and HTML will not work within them. Note that, unlike code blocks, code spans require you to manually escape any HTML within!

5. Linebreaks

End a line with two spaces to add a <br/> linebreak:

How do I love thee?  
Let me count the ways

6. 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___.

7. Basic Links

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][1].
Here's a very readable link to [Yahoo!][yahoo].

[1]: http://www.google.com/
[yahoo]: http://www.yahoo.com/

The link definitions can appear anywhere in the document -- before or after the place where you use them. The link definition names [1] and [yahoo] can be any unique string, and are case-insensitive; [yahoo] is the same as [YAHOO].

You can also use standard HTML hyperlink syntax.

<a href="http://example.com" title="example">example</a>

Enclosing them in angle brackets.

Have you seen <http://example.com>?

All URLs must be fully qualified path names. We do not support relative paths.

8. API Documentation Links

A shortcut to API documentation link can be done as follows:

API documenation on [CDbConnection::createPdoInstance()].
This will generate a link CDbConnection::createPdoInstance() to the latest API documentation.

9. Headers

Underline text to make the two <h1> <h2> top-level headers :

Header 1
========

Header 2
--------

The number of = or - signs doesn't matter; one will work. But using enough to underline the text makes your titles look better in plain text.

10. Simple Lists

A bulleted <ul> list:

- Use a minus sign for a bullet
+ Or plus sign
* Or an asterisk

A numbered <ol> list:

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

11. Simple Blockquotes

Add a > to the beginning of any line to create a <blockquote>.

> 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.

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.

12. Need More Detail?

Visit the official Markdown syntax reference page.