markdown的一部分基础

markdown快速学习

可以生成目标HTML的轻量级标记语言。

一、标题

Markdown提供2种样式的标题,对应到HTML种的 h1 到 h6 标签

  • 第一种:只支持 h1 和h 2,分别用(=)和(-)表示
  • 第二种:以#开头,1-6个字分别代表 h1 - h6

markdown例子:

一级标题
===
二级标题
---
### 三级标题
###### 六级标题

实际输出:

一级标题

二级标题

三级标题

六级标题

二、段落

像平时一段内容为一段,对应HTML中 blockquote 标签,连续两个回车即可。或使用两个以上空格加上回车。

markdown例子:

Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.

The quick brown fox jumped over the lazy
dog's back.

实际输出:

Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.

The quick brown fox jumped over the lazy dog's back.

三、引用

显示出引出的标志,段落开头用>符号,然后接一个空格,对应HTML中 p 标签

markdown例子:

> this is a blockquote.
> 
> this is the second paragraph in blockquote.
> 
> ## this is an H2 in a blockquote.

实际输出:

this is a blockquote

this is the second paragraph in the blockquote

this is an H2 in a blockquote

四、字体

支持斜体加粗删除等。分别对应HTML中 em 、strong 、s 标签

markdown例子:

some of these words *are emphasized*.
some of these words _are emphasized also_.

use two asterisks for **strong emphasis**.
or, if you prefer,__use teo underscores instead__.

~~345~~

实际输出:

Some of these words are emphasized. Some of these words are emphasized also.

Use two asterisks for strong emphasis. Or, if you prefer, use two underscores instead.

345

五、分割线

可以使用3个连续的 * 或 _ 或 - 表示分割符号,对应HTML中的 hr 标签

markdown例子:

***
___

---

实际输出:




六、列表

列表分有序和序列之分,分别对应HTML中 ul 、 ol 标签

1. 无序列表

无序列表可以使用: * 或 + 或 - 符号

markdown例子:

*   candy.
*   gum.
*   booze.

或

+   candy.
+   gum.
+   booze.

或

-   candy.
-   gum.
-   booze.

实际输出:

  • Candy.
  • Gum.
  • Booze.

2. 有序列表

有序列表使用:数字 与 符号 . 的形式

markdown例子:

1.red
2.green
3.blue

实际输出:

  1. Red
  2. Green
  3. Blue

七、超链接

markdown 对于超链接有两种写法,对应HTML中的 a 标签:

1. 图片

	![图片](图片的网络地址)

比如
youku2. 链接

	[链接名](连接地址)

比如

百度

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值