This guide shows you how to use Markdown instead of HTML when writing posts or comments.
Markdown is way easier to use than HTML. (But you can still use HTML at the same time if you really want to and you know how.)
Just write in the comment box the same way it's shown in this file, it's really that simple.
(See bottom for more info about Markdown itself.)
For a URL or email, just write it like this:
To use text for the link, write it like this.
You can add a title (which shows up under the cursor), like this.
You can also put the link URL below the current paragraph like this. Here the text "link URL" gets linked to "http://url", and the lines showing "1: http://url" won't show anything.
Or you can use a shortcut reference, which links the text "shortcut" to the link named "shortcut" on the next paragraph.
Use * or _ to emphasize things:
this is in italic and so is this
this is in bold and so is this
this is bold and italic and so is this
Just write paragraphs like in a text file and they will display how you would expect. A blank line separates paragraphs.
So this is a new paragraph. But any text on adjacent lines will all end up in the same paragraph.
Use the > character in front of a line, just like in email. Use it if you're quoting a person, a song or whatever.
You can use italic or lists inside them also. And just like with other paragraphs, all of these lines are still part of the blockquote, even without the > character in front.
To end the blockquote, just put a blank line before the following paragraph.
If you want some text to show up exactly as you write it, without Markdown doing anything to it, just indent every line by at least 4 spaces (or 1 tab). This line won't have any markdown formatting applied. I can even write HTML and it will show up as text. This is great for showing program source code, or HTML or even Markdown. this won't show up as HTML but exactly as you see it in this text file.
(In a normal paragraph, this will show up in bold just like normal HTML.) Remember, you have to indent by at least 4 spaces to do it. This paragraph won't be preformatted. And if you use reference links, make sure the links are indented by fewer than 4 spaces.
(woops, that link didn't work, see? It just got displayed as preformatted text.) As a shortcut you can use backquotes to do the same thing while inside
a normal pargraph.
This won't be *italic* or **bold** at all.
To start an ordered list, write this:
Just put 1 or more dashes or equals signs (--- or ===) below the title.
You might use the huge header at the very top of your text for a title or something (except weblog posts usually already have a title), and use the smaller header for subtitles or sections.
just put three or more *'s or -'s on a line:
or you can use single spaces between then, like this:
Make sure you have a blank line above the dashes, though, or else:
To include an image, just put a "!" in front of a text link:
The "alternate text" will show up if the browser can't load the image.
You can also use a title if you want, like this:
What if you want to just show asterisks, not italics?
The backslashes will disappear and leave the asterisks.
You can do the same with any of the characters that have a special meaning for Markdown.
More ways of doing headers:
You can use up to 6
# characters at the beginning of the line.
(You can optionally put them on the end, too, and they will disappear.)
Don't worry about special HTML characters. I can write an ampersand & a less-than sign, and they show up as I intend them to: 3 < 4.
(You can still write
& (& character) and
< (<) or
> (>) if you
want. or ignore what I just said.)
This text file shows you how to use Markdown instead of crappy HTML when writing posts or comments. Markdown is an easier way of making HTML pages from text, rather than having to know HTML.
Thanks to John Gruber and Aaron Swartz for creating Markdown.
No rights reserved, do with this what you like.
Written by Greg Schueler,