标记语言 (ML, Markup Language) 横向对比¶
References¶
- Markdown versus HTML
- MarkDown and HTML Comparison
- How do I use Markdown? - IBM
- commonmark.org/help/
- Markdown - Learn The Web
- Markdown Guide
Tools¶
共同特性¶
- Markup languages. 标记语言
- Format plain text. 使文本格式化
Formatting elements 横向对比¶
Markdown | HTML |
---|---|
easier | - |
- | more expressive |
- | Semantic tags and tagging. |
Formatting elements, Markdown syntax elements | HTML tags |
Headings, Headers 标题¶
Paragraphs 段落¶
Bulleted Lists 列表¶
Abstract
- Ordered list 有序列表
- Unordered list 无序列表
- Definition list 定义列表
- Nested list
- Task list
x.1 Ordered list 有序列表¶
x.2 Unordered list 无序列表¶
x.3 Definition list 定义列表¶
y.1 Nested List 嵌套列表¶
- Dots indicate leading spaces.
y.2 M: Task List (Checklist)¶
- Dots indicate spaces.
Blockquotes 块引用¶
Code¶
Abstract
- Inline Code 内联代码
- Code Blocks 代码块
Inline Code 内联代码¶
Code Blocks 代码块¶
Dots indicate leading spaces.
Table 表格¶
Tables | Are | Cool |
---|---|---|
col 1 is | left-aligned | $100 |
col 2 is | centered | $52 |
col 3 is | right-aligned | $9 |
Markdown
Header 1 | Header 2
----------|----------
Cell 11 | Cell 12
Cell 21 | Cell 22
| Tables | Are | Cool |
|----------|:-------------:|-----:|
| col 1 is | left-aligned | $100 |
| col 2 is | centered | $52 |
| col 3 is | right-aligned | $9 |
HTML
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell 11</td>
<td>Cell 12</td>
</tr>
<tr>
<td>Cell 21</td>
<td>Cell 22</td>
</tr>
</tbody>
</table>
Image 图片¶
Markdown


OR
![Alt Text][1]
⋮
[1]: http://url/c.jpg
URLs, Links 超链接¶
Emphasis¶
Italic 斜体
A single set of asterisks.
Bold 粗体
Double asterisks.
Strikethrough
Underlined
This was inserted
Text Highlighting¶
Text to be highlighted
Superscript and Subscript¶
32nd
H2O
Horizontal Rule 水平分割线¶
Markdown 独占格式¶
Footnotes¶
Question
在 HTML 中如何实现 footnotes 的效果?
Sentence with a footnote label 1.
Footnote **Reference**
-
[^1]
Footnote **Content**
-
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Escaping Characters¶
Emojis and Emoticons¶
Here's our favorite emoji cheat sheet.
Typographic Replacements¶
Keyboard Keys¶
Ctrl+Alt+Del
-
Foodnote content. ↩