markdown的主要的语法

markdown的主要的语法

今天开始打算使用markdown来写博客了,因为我的博客大部分是跟编程有关系,所以经常要嵌入代码,而传统的编辑器实在很难看。下面把markdown的主要的语法写下来,

 

Markdown Processed
Emphasis *Emphasize* _emphasize_

**Strong** __Strong__

Emphasize
Strong

Some WordPress.com themes

may have different formatting

for these styles

Inline Links A [link](http://example.com “Title”). A link.
Referenced Links Some text with [a link][1] and

another [link][2].

 

[1]: http://example.com/ “Title”

[2]: http://example.org/ “Title”

Some text with a link and another link.
Inline Images Logo: ![Alt](/wp.png “Title”)

The “Alt” text (alternative text) makes image

s accessible to visually impaired

Logo:
Referenced Images Smaller logo: ![Alt][1]

 

[1]: /wp-smaller.png “Title”

Smaller logo:
Linked Images Linked logo:

[![alt text](/wp-smaller.png)]

(http://wordpress.com/ “Title”)

Linked logo:
Footnotes I have more [^1] to say up here.

 

[^1]: To say down here.

I have more 1 to say up here.

  1. To say down here.
Line breaks We do not support Markdown’s typical double-space

to generate a line break due to our built-in

auto-linebreaking function. A regular line break

will generate a line break on output.

Bullet Lists * Item

* Item

– Item

– Item

  • Item
  • Item
  • Item
  • Item
Numbered Lists 1. Item

2. Item

  1. Item
  2. Item
Mixed Lists 1. Item

2. Item

* Mixed

* Mixed

3. Item

  1. Item
  2. Item
    • Mixed
    • Mixed
  3. Item
Blockquotes > Quoted text.

> > Quoted quote.

 

> * Quoted

> * List

Quoted text.

Quoted quote.

·         Quoted

·         List

Preformatted Begin each line with

two spaces or more to

make text look

e x a c t l y

like you   type i

t.

Begin each line with

two spaces or more to

make text look

e x a c t l y

like you type i

t.

Code `This is code` This is code
Code block ~~~~

This is a

piece of code

in a block

~~~~

 

“`

This too

“`

1

2

3

This is a

piece of code

in a block

1 This too
Syntax highlighting “`css

#button {

border: none;

}

“`

See Posting Source Code for supported languages

1

2

3

#button {

border: none;

}

Headers # Header 1

## Header 2

### Header 3

#### Header 4 ####

##### Header 5 #####

###### Header 6 ######

Closing hash marks are optional on all levels

Header 1

Header 2

Header 3

Header 4

Header 5

Header 6

Definition Lists WordPress

: A semantic personal publishing

platform

 

Markdown

: Text-to-HTML conversion tool

WordPress

A semantic personal publishing

platform

Markdown

Text-to-HTML conversion tool

Formatting for definition lists may vary

between themes

Abbreviations Markdown converts text to HTML.

 

*[HTML]: HyperText Markup Language

Definitions can be anywhere in the document

Markdown converts text toHTML.

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则

按侵权处理.

    分享到:
This entry was posted in 杂项 and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*