Markdown 中的下划线

2024年8月28日 | 1分钟阅读

Markdown 中没有用于下划线的语法。要使用下划线命令,我们可以在 Markdown 中使用 HTML 语法来为文本添加下划线。下划线用于突出显示 Markdown 中的链接。因此,为了避免混淆,Markdown 不使用它来为文本添加下划线。

使用 HTML 添加下划线

在在线编辑器中不适用使用 HTML 添加下划线。但是,我们可以在 Visual Studio Code 中使用它。

语法

文本插入在 <u> 和 </u> 下划线标签之间。

其中,

U 代表下划线

例如:

输出:

Text

示例

让我们讨论一个基于使用 HTML 标签在 Markdown 中添加下划线的例子。

示例 1

输出

The underline tag in Markdown using HTML can be only implemented in visual studio . It does not work in online Markdown editors. If underline is used in any online editor (for example, Dillinger), it will considered it as a normal text, which will be the same syntax as the input.