Monday, November 19, 2012

Markdown: An introduction


Markdown is a way to format your text to add bold and italic text, images, headings and a few other things, without having to use HTML.
SimpleEditions is one of many websites that support Markdown, so when you write a tutorial you can format your text using the following syntax:

Bold and italic text

To create italic text, surround one or a few words with stars:
This is how you create *italic text*.
To create bold text, surround one or a few words with double stars:
This is how you create **bold text**.
If you have to, you can make your text both bold and italic:
This is how you create ***bold and italic text***.

A bullet list

Create bullet lists using stars:
* Item 1  
* Item 2  
* Item 3
Will look like this:
  • Item 1
  • Item 2
  • Item3
You can also use plus (+) or minus (-) instead of a star.

Creating links

Combine brackets and parenthesis to create links in the text. It's quite simple:
Here's [a great website](http://www.simpleeditions.com). It'll float your boat.
Will look like this:
Here's a great website. It'll float your boat.

Headers

Markdown has support for different levels of headers using the hash sign (#):
# This is the title
Here's some very good boiler plate text. I don't even know what a boiler is, even less a plate.

## This is the subheader
Subheaders are awesome. Even better than you think.

### This is the third level header.
And so on.
Will look like this:

This is the title

Here's some very good boiler plate text. I don't even know what a boiler is, even less a plate.

This is the subheader

Subheaders are awesome. Even better than you think.

THIS IS THE THIRD LEVEL HEADER.

And so on.
When converted to HTML, the first level header will be a <h1> element, a third level header will be a <h3>, etc. At SimpleEditions there's only one first level header per page, namely the title (in this case, it's "Markdown: An introduction", a bit further up). Therefore, you typically always begin with a second level header (## Like this) when you write your tutorial text.

Quotes

Add a greater-than sign (>) in front of anything you are quoting, and the text will be moved slightly towards the middle.
> "Never increase, beyond what is necessary,   
> the number of entities required to explain anything."  
> – *William Ockham*
Will look like this:
"Never increase, beyond what is necessary,
the number of entities required to explain anything."
– William Ockham
Note how the name, William Ockham, is surrounded by stars to make it render in italic text.

No comments:

Post a Comment