Markdown语法
推荐使用markdown编辑器typora,目前是beta版本免费的。
1.标题
Markdown中用#
添加标题,#越多,标题等级越小。标题的存在有利于你在outline中更好地整理你的文本,同时方便做目录。
代码:
#Title1
##Title2
######Title6
效果
Title1
Title2
Title6
2.清单
清单分为有序和无序。有序清单输数字1.
, 无序清单前输入-
或者*
.
代码:
* list1
- list2
1. ordered list01
效果:
- list1
- list2
- ordered list01
3.文字字体与修饰
文字字体与修饰包括**
加粗**
,*
斜体*
,~~
删除线~~
,==
高亮==
,^
上标^
,~
下标~
。使用typora时在preference
-->markdown
中勾选好相关设置。
代码:
**Bold**
*Italic*
~~delete~~
==highlight==
^superscript^
~subscript~
效果:
Bold
Italic
delete
==highlight==
Xsuperscript
Xsubscript
改变文字的字体颜色大小等需要用到<font>
标签,字体用face,颜色用color,大小用size进行个性化:
<font face="Times New Roman">TEXT</font>
<font color=red>YOOOO</font>
<font size=6>SIZE6</font>
<font face="黑体" color=blue size=3>字体黑体,颜色蓝色,大小3号</font>
文字高亮的同时文字颜色也可以调整,这样便于我们用不同的颜色标记不同重要程度的内容:
<mark>highlight</mark>
<mark><font color=purple>highlight</font></mark>
修改文字的背景色时只能将那一行看作表格,改变那个格子的颜色,借助<table><tr><td>
。当然如果需要更多对背景颜色的修改(不局限于某行),也可以安装css渲染插件Markdown Here.
<table><tr><td bgcolor=pink>不同背景色</td></tr></table>
4.分隔符
代码:
------
------
效果:
5.引用
代码:
> This is a quote
>> next level quote
效果:
This is a quote
next level quote
6.代码块
代码块前加```
然后输入enter
,之后即可编写代码段。
代码:
```
code area
效果:
code area
行内代码的添加是在代码前后加上`
.
some text here and you want to add `code` in the line.
some text here and you want to add code
in the line.
特例:如何在行内代码内嵌入反引号`
?答案是在前后用连续两个反引号包裹内部需要添加的一个反引号,中间加上空格。要嵌入式n个反引号,用于包裹的反引号数就为n+1即可。
7.插入链接
插入链接用[]()
以及<>
,圆括号()
里本地图片写入网址:
here is the link [baidu](https://www.baidu.com)
here is the link baidu
here is the email <notreal@gmail.com>
here is the email notreal@gmail.com
8.插入图片
插入图片分为插入本地图片和网络图片,本地图片写入路径,网络图片写URL。注意本地图片的路径一旦改变,插入的图片将不能显示,所以通常大家会把图片上传至图库,有了URL后当作网络图片插入,这样也方便博客的书写。
here is the pic from web ![PIC](https://s2.ax1x.com/2019/11/06/MiBbtA.png)
here is the pic from web 是的这里我懒得用别人图片就自己截了个“插入图片”四个字的截图,传到图床,再放在这里。
9.表格
| 项目 | 性能1 | 性能2 | 性能3 |
| ----- | ----- | ----- | ----- |
| a机器 | 优秀 | 良好 | 良好 |
项目 | 性能1 | 性能2 | 性能3 |
---|---|---|---|
a机器 | 优秀 | 良好 | 良好 |