title: Markdown date: 2014-12-25 00:31:00 categories: - Technology - Github tags: - markdown banner: /hexo-theme-icarus/gallery/markdown.jpg --- A markdown example shows how to write a markdown file. This document integrates core syntax and extensions (GMF). * [Block Elements](#block-elements) * [Paragraphs and Line Breaks](#paragraphs-and-line-breaks) * [Headers](#headers) * [Blockquotes](#blockquotes) * [Lists](#lists) * [Code Blocks](#code-blocks) * [Horizontal Rules](#horizontal-rules) * [Table](#table) * [Span Elements](#span-elements) * [Links](#links) * [Emphasis](#emphasis) * [Code](#code) * [Images](#images) * [Strikethrough](#strikethrough) * [Miscellaneous](#miscellaneous) * [Automatic Links](#automatic-links) * [Backslash Escapes](#backslash-escapes) * [Inline HTML](#inline-html) ## Block Elements ### Paragraphs and Line Breaks #### Paragraphs HTML Tag: `

` One or more blank lines. (A blank line is a line containing nothing but **spaces** or **tabs** is considered blank.) Code: This will be inline. This is second paragraph. Preview: *** This will be inline. This is second paragraph. *** #### Line Breaks HTML Tag: `
` End a line with **two or more spaces**. Code: This will be not inline. Preview: *** This will be not inline. *** ### Headers Markdown supports two styles of headers, Setext and atx. #### Setext HTML Tags: `

`, `

` “Underlined” using **equal signs (=)** as `

` and **dashes (-)** as `

` in any number. Code: This is an H1 ============= This is an H2 ------------- Preview: *** This is an H1 ============= This is an H2 ------------- *** #### atx HTML Tags: `

`, `

`, `

`, `

`, `

`, `
` Uses 1-6 **hash characters (#)** at the start of the line, corresponding to `

` - `

`. Code: # This is an H1 ## This is an H2 ###### This is an H6 Preview: *** # This is an H1 ## This is an H2 ###### This is an H6 *** Optionally, you may “close” atx-style headers. The closing hashes **don’t need to match** the number of hashes used to open the header. Code: # This is an H1 # ## This is an H2 ## ### This is an H3 ###### Preview: *** # This is an H1 # ## This is an H2 ## ### This is an H3 ###### *** ### Blockquotes HTML Tag: `
` Markdown uses email-style **>** characters for blockquoting. It looks best if you hard wrap the text and put a > before every line. Code: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse > id sem consectetuer libero luctus adipiscing. Preview: *** > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse > id sem consectetuer libero luctus adipiscing. *** Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph. Code: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Preview: *** > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. *** Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >. Code: > This is the first level of quoting. > > > This is nested blockquote. > > Back to the first level. Preview: *** > This is the first level of quoting. > > > This is nested blockquote. > > Back to the first level. *** Blockquotes can contain other Markdown elements, including headers, lists, and code blocks. Code: > ## This is a header. > > 1. This is the first list item. > 2. This is the second list item. > > Here's some example code: > > return shell_exec("echo $input | $markdown_script"); Preview: *** > ## This is a header. > > 1. This is the first list item. > 2. This is the second list item. > > Here's some example code: > > return shell_exec("echo $input | $markdown_script"); *** ### Lists Markdown supports ordered (numbered) and unordered (bulleted) lists. #### Unordered HTML Tag: `