From 26b4aa77f5b85f47a96a5930a67dfbec53b8710d Mon Sep 17 00:00:00 2001
From: Waylan Limberg
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.
+ "underlining" with equal signs (=
) and hyphens (-
), respectively.
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.
@@ -168,14 +168,14 @@ Or, if you prefer, <strong>use two underscores instead</strong>.<
This is an [example link](http://example.com/).
Output:
-<p>This is an <a href="http://example.com/">
+<p>This is an <a href="http://example.com/">
example link</a>.</p>
Optionally, you may include a title attribute in the parentheses:
-This is an [example link](http://example.com/ "With a Title").
+This is an [example link](http://example.com/ "With a Title").
Output:
-<p>This is an <a href="http://example.com/" title="With a Title">
+<p>This is an <a href="http://example.com/" title="With a Title">
example link</a>.</p>
Reference-style links allow you to refer to your links by names, which
you define elsewhere in your document:
@@ -183,15 +183,15 @@ example link</a>.</p>
I get 10 times 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"
+[1]: http://google.com/ "Google"
+[2]: http://search.yahoo.com/ "Yahoo Search"
+[3]: http://search.msn.com/ "MSN Search"
Output:
-<p>I get 10 times more traffic from <a href="http://google.com/"
-title="Google">Google</a> than from <a href="http://search.yahoo.com/"
-title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
-title="MSN Search">MSN</a>.</p>
+<p>I get 10 times more traffic from <a href="http://google.com/"
+title="Google">Google</a> than from <a href="http://search.yahoo.com/"
+title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
+title="MSN Search">MSN</a>.</p>
The title attribute is optional. Link names may contain letters,
numbers and spaces, but are not case sensitive:
@@ -202,22 +202,22 @@ title="MSN Search">MSN</a>.</p>
Output:
<p>I start my morning with a cup of coffee and
-<a href="http://www.nytimes.com/">The New York Times</a>.</p>
+<a href="http://www.nytimes.com/">The New York Times</a>.</p>
Images
Image syntax is very much like link syntax.
Inline (titles are optional):
-![alt text](/path/to/img.jpg "Title")
+![alt text](/path/to/img.jpg "Title")
Reference-style:
![alt text][id]
-[id]: /path/to/img.jpg "Title"
+[id]: /path/to/img.jpg "Title"
Both of the above examples produce the same output:
-<img src="/path/to/img.jpg" alt="alt text" title="Title" />
+<img src="/path/to/img.jpg" alt="alt text" title="Title" />
Code
In a regular paragraph, you can create code span by wrapping text in
--
cgit v1.2.3