the basic gruber markdown basics

bowerbird bowerbird at aol.com
Thu Sep 11 22:45:42 EDT 2014


# THE GIST OF MARKDOWN'S FORMATTING SYNTAX

### an adaption from text by John Gruber

<http://daringfireball.net/projects/markdown/basics>





## PARAGRAPHS


A paragraph is simply one or more consecutive lines of text,
separated by one or more blank lines.

Normal paragraphs should not be indented with spaces or tabs.

Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.

The quick brown fox jumped over the lazy
dog's back.





## HEADERS


Markdown offers two styles of headers: setext and atx.

Setext-style headers for `<h1>` and `<h2>` are created by
"underlining" with equal signs (=) and hyphens (-), respectively.

A First Level Header
===============================

A Second Level Header
-------------------------------------

To create an atx-style header, you put 1-6 hash marks (#)
at the beginning of the line -- the number of hashes
equals the resulting HTML header level.

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

so much for headers.





## BLOCKQUOTES


Blockquotes are indicated using email-style angle brackets.

> This is a blockquote.





## EMPHASIS


Markdown uses asterisks and underscores to indicate spans of emphasis.

Some of these words *are emphasized.*

Some of these words _are emphasized also._

Use two asterisks for **strong emphasis.**

Or, if you prefer, __use two underscores instead.__





## LISTS


Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, +, 
and -)
as list markers. These three markers are interchangable.

* Candy1
* Gum1
* Booze1


+ Candy2
+ Gum2
+ Booze2


- Candy3
- Gum3
- Booze3


* Candy4
+ Gum4
- Booze4

<hr>

* Candy5
* Gum5
* Booze5

<hr>

+ Candy6
+ Gum6
+ Booze6

<hr>

- Candy7
- Gum7
- Booze7

<hr>

* Candy8
+ Gum8
- Booze8


Ordered (numbered) lists use numbers followed by periods as list 
markers:

1. Red1
2. Green1
3. Blue1

1. Red2
1. Green2
1. Blue2

9. Red3
9. Green3
9. Blue3

<hr>

1. Red4
2. Green4
3. Blue4


1. Red5
1. Green5
1. Blue5


9. Red6
9. Green6
9. Blue6

<hr>

1. Red7
2. Green7
3. Blue7

<hr>

1. Red8
1. Green8
1. Blue8

<hr>

9. Red9
9. Green9
9. Blue9

If you put blank lines between items,
you'll get `<p>` tags for the list item text.
You can create multi-paragraph list items
by indenting the paragraphs by 4 spaces or 1 tab:

* A list item.

    With multiple paragraphs.

* Another item in the list.





## LINKS


Markdown supports two styles for creating links: inline and reference.
With both, use square brackets to delimit the text to turn into a link.

Inline-style links use parentheses immediately after the link text:

This is an [example link](http://example.com/).

Optionally, you may include a title attribute in the parentheses:

This is an [example link](http://example.com/ "With a Title").

Reference-style links allow you to refer to your links by names,
which you define elsewhere in your document:

I get more traffic from [Google][1] than from [Yahoo][2] or [MSN][3].

[1]: http://google.com/ "Google"

[2]: http://search.yahoo.com/ "Yahoo Search"

[3]: http://search.msn.com/ "MSN Search"

The title attribute is optional. Link names may contain
letters, numbers, and spaces, but are not case sensitive:

I start my morning with a cup of coffee and
[The New York Times][NY Times].

[ny times]: http://www.nytimes.com/





## IMAGES


Image syntax is very much like link syntax.

Inline:

![alt text](http://zenmagiclove.com/simple/gruber-logo1.png "optional 
title")

Reference-style:

![alt text][id]

[id]: http://zenmagiclove.com/simple/gruber-logo2.png "optional title"





## CODE


In a regular paragraph, you can create code span by wrapping text
in `backtick` quotes. Any ampersands (&) and angle brackets (< or >)
will automatically be translated into HTML entities. This makes it easy
to use Markdown to write about HTML example code:

I wish SmartyPants used named entities like `—`
instead of decimal-encoded entites like `—`.

<p>I wish SmartyPants used named entities like
<code>&mdash;</code> instead of decimal-encoded
entites like <code>&#8212;</code>.</p>

To specify an entire block of pre-formatted code,
indent every line of the block by 4 spaces or 1 tab.
Just like with code spans, &, <, and > characters
will be escaped automatically.

    To specify an entire block of pre-formatted code,
    indent every line of the block by 4 spaces or 1 tab.
    Just like with code spans, &, <, and > characters
    will be escaped automatically.

# for use in doing first-line basic testing of markdown systems



More information about the Markdown-Discuss mailing list