OSDN Git Service

Regular updates
[twpd/master.git] / markdown.md
1 ---
2 title: Markdown
3 category: Markup
4 layout: 2017/sheet
5 prism_languages: [markdown]
6 updated: 2020-07-01
7 weight: -1
8 ---
9
10 ## Reference
11 {:.-three-column}
12
13 ### Headers
14
15 ```markdown
16 # h1
17 ## h2
18 ### h3
19 #### h4
20 ##### h5
21 ###### h6
22 ```
23
24 ```markdown
25 Header 1
26 ========
27 ```
28
29 ```markdown
30 Header 2
31 --------
32 ```
33
34 ### Emphasis
35
36 ```markdown
37 *italic*
38 _italic_
39 ```
40
41 ```markdown
42 **bold**
43 __bold__
44 ```
45
46 ```markdown
47 ***bold italic***
48 ___bold italic___
49 ```
50
51 ```markdown
52 ~~strikethrough~~
53 ```
54
55 ```markdown
56 `code`
57 ```
58
59 ### Lists
60
61 ```markdown
62 * Item 1
63 * Item 2
64 ```
65
66 ```markdown
67 - Item 1
68 - Item 2
69 ```
70
71 ```markdown
72 - [ ] Checkbox off
73 - [x] Checkbox on
74 ```
75
76 ```markdown
77 1. Item 1
78 2. Item 2
79 ```
80
81 ### Links
82
83 ```markdown
84 [link](http://google.com)
85 ```
86
87 ```markdown
88 [link][google]
89 [google]: http://google.com
90 ```
91
92 ```markdown
93 <http://google.com>
94 ```
95
96 ### Images
97
98 ```markdown
99 ![Image alt text](/path/to/img.jpg)
100 ![Image alt text](/path/to/img.jpg "title")
101 ![Image alt text][img]
102 ```
103
104 ```markdown
105 [img]: http://foo.com/img.jpg
106 ```
107
108 ### Code
109
110 ```
111     4 space indent
112     makes a code block
113 ```
114
115 ~~~markdown
116 ```
117 code fences
118 ```
119 ~~~
120
121
122 ~~~markdown
123 ```js
124 codeFences.withLanguage()
125 ```
126 ~~~
127
128 ### Blockquotes
129
130 ```markdown
131 > This is
132 > a blockquote
133 >
134 > > Nested
135 > > Blockquote
136 ```
137
138 ### Horizontal line
139
140 ```markdown
141 ----
142 ```
143
144 ```markdown
145 ****
146 ```
147
148 ### Tables
149
150 ```markdown
151 | Column 1 Heading | Column 2 Heading |
152 | ---------------- | ---------------- |
153 | Some content     | Other content    |
154 ```
155
156 ```markdown
157 Column 1 Heading | Column 2 Heading
158 --- | ---
159 Some content | Other content
160 ```