当前位置:网站首页>Markdown 技能树(2):段落及强调
Markdown 技能树(2):段落及强调
2022-06-29 06:38:00 【programmer_ada】
Markdown 技能树(2):段落及强调
在 Markdown 中,段落是由一个以上相连接的行句组成,而一个以上的空行则会切分出不同的段落,一般的段落不需要用空白或换行缩排。
空行的定义是显示上看起来像是空行,便会被视为空行。
比如,若某一行只包含空白
和tab``,则该行也会被视为空行
「一个以上相连接的行句组成」这句话其实暗示了 Markdown 允许段落内的强迫换行,这个特性和其他大部分的 text-to-HTML 格式不一样(包括 MovableType 的「Convert Line Breaks」选项),其它的格式会把每个换行都转成 <br /> 标签。
这也就意味着在 Markdown 中,如果需要把一段内容当做段落来显示,则需要保证该段内容上方及下方至少各有一个空行,比如:
这里是段落一
这里是段落二
这段文字在 Markdown 中就会被显示成一行:
这里是段落一
这里是段落二
如果需要对段落进行换行的话,可以使用两个以上空格加上回车,比如:
这里是段落一
这里是段落二
这里是段落一
这里是段落二
当然,你也可以在段落后面使用一个空行来表示重新开始一个段落,比如:
这里是段落一
这里是段落二
这里是段落一
这里是段落二
此外,你也可以选择在第一行的末尾添加 <br> 进行换行,比如:
这里是段落一<br>
这里是段落二
就会显示成两段内容:
这里是段落一
这里是段落二
强调
Markdown 使用星号 * 和下划线 - 作为标记强调字词的符号。
斜体
在 Markdown 中,将内容用 * 或 _ 包裹起来,包围的字词会被转成用 标签包围,会显示成 斜体,比如:
*这里是斜体内容1*
_这里是斜体内容2_
会显示为
这里是斜体内容1
这里是斜体内容2
<em>这里是斜体内容1</em>
<em>这里是斜体内容2</em>
需要注意的是:
- 用什么符号开启标签,就要用什么符号结束
*和_两边都有空白的话,它们就只会被当成普通的符号- 如果要在文字前后直接插入普通的星号或下划线,可以用反斜杠
\* \_
粗体
用两个 * 或 _ 包起来的话,则会被转成 ,例如:
**这里是粗体内容1**
__这里是粗体内容2__
会显示为
这里是粗体内容1
这里是粗体内容2
<strong>这里是斜体内容1</strong>
<strong>这里是斜体内容2</strong>
删除线
你还可以使用两个 ~ 来给内容加上删除线,例如:
~~这个内容是被删掉的~~
会显示为
这个内容是被删掉的
<del>这个内容是被删掉的</del>
小结
让我们来回顾一下段落及强调的知识点吧:
- 段落的换行
- 强调的语法,包括 斜体加粗以及
删除线
边栏推荐
- NoSQL数据库之Redis(四):Redis的发布和订阅
- shell条件判断详解
- Idea common plug-ins
- NoSQL数据库之Redis(一):安装 & 简介
- Qt 串口编程
- json tobean
- Exploring the depth of objects in JVM series
- QT container class
- What is the difference between software engineer and software development? What is the difference between software engineer and software developer?
- It is the only one in China that Alibaba cloud container service has entered the Forrester leader quadrant
猜你喜欢

Service grid ASM year end summary: how do end users use the service grid?

The annual technology inventory of cloud primitives was released, and it was the right time to ride the wind and waves
![[QNX Hypervisor 2.2用户手册]6.2.1 Guest之间通信](/img/3d/6a0cde206a09a7ef03038fb99cf532.png)
[QNX Hypervisor 2.2用户手册]6.2.1 Guest之间通信

How to do the performance pressure test of "Health Code"

Annual inventory review of Alibaba cloud's observable practices in 2021

RPC和RMI

QT program packaging and publishing windeployqt tool

How does schedulerx help users solve distributed task scheduling problems?

Unity ar shadow shadow

Ci tool Jenkins II: build a simple CI project
随机推荐
Qt STL类型迭代器
国内代码托管中心- 码云
UVM authentication platform
Method of changing host name (permanent)
Markdown 技能树(7):分隔线及引用
Open source 23 things shardingsphere and database mesh have to say
Idea integrated code cloud
WebRTC系列-网络传输之8-连通性检测
利用IPv6實現公網訪問遠程桌面
shell条件判断详解
通过keyup监听textarea输入更改按钮样式
【软件测试】接口——基本测试流程
QT qlineedit details
Spark RDD案例:统计每日新增用户
Qt QLineEdit详解
Introduction to QT qfileinfo
Oscilloscope symbols
Instanceklass "suggestions collection" of hotspot class model
VerilogA - dynamic comparator
Li Kou daily question - day 30 -1281 Difference of sum of bit product of integer