介绍
Markdown作为一个轻量级标记语言,排版语言简洁,让人更多的关注内容本身而非排版。它使用方便简洁,可以与HTML混编,可导出HTML,PDF和Word。因此而被大量使用,例如Github和Wikipedia便支持Markdown渲染功能。
如何使用
Markdown只需要少量的标记就能标注其内容的形式,属于标题,或者是代码块等等。你需要安装一个可以渲染Markdown源文件的软件来查看它,例如Typora,除了支持编辑Markdown功能之外,还可以导出多种需要的文件格式。
基本语法
元素 | Markdown 语法 |
---|---|
标题 | # H1 |
粗体 | **bold text** |
斜体 | *italicized text* |
删除线 | ~~The world is flat.~~ |
引用块 | > blockquote |
有序列表 | 1. First item 2. Second item |
无序列表 | - First item - Second item |
代码 | `code` |
分割线 | --- |
链接 | [title](http://website.com) |
图片 | ![alt text](image.png) |
扩展语法
表格
| Syntax | Decription |
|-----------|---------------|
| Header | Title |
| Paragraph | Text |
代码块
```c#
using System;
class Hello{
static void Main() {
Console.WriteLine("Hello, World!");
Console.ReadLine();
}
}
```
注脚
Here's a sentence with a foot note.[^1]
[^1]:This is the footnote.
标题编号
### My Great Heading {#custom-id}
任务列表
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media