换行
在一行的末尾添加两个或多个空格,然后按回车键,即可创建一个换行(<br>)。
换行语法
| Markdown 语法 | HTML 语法 | 渲染效果 |
|---|---|---|
This is the first line.This is the second line. | <p>This is the first line.<br/>This is the second line.</p> | This is the first line. This is the second line. |
换行语法的最佳实践
大多数Markdown程序支持两个或者多个空格进行换行,被称为结尾空格的方式(trailing whitespace).
但在编辑器中很难看到空格,并且很多人有意或者无意的会添加空格.由于这个原因,我们可能会采取别的方式
我们可以采用另一种换行方式:HTML的br标签。
| ✅ Do this | ❌ Don't do this |
|---|---|
This is the first line.This is the second line. | This is the first line. This is the second line. |
This is the first line.This is the second line. | This is the first line. This is the second line. |