Get underlined text with Markdown

2020-05-14 07:05发布

I am using BlueCloth as a Markdown library for Ruby, and I can't find any syntax for getting a text underlined. What is it?

6条回答
干净又极端
2楼-- · 2020-05-14 07:11

For everyone out here using Markdown in Jupyter Notebooks, you can underline text using syntax similar to HTML5 (<u> and </u>).

<u> Bolded Words Here </u>

查看更多
家丑人穷心不美
3楼-- · 2020-05-14 07:12

In GitHub markdown <ins>text</ins>works just fine.

查看更多
仙女界的扛把子
4楼-- · 2020-05-14 07:19

Another reason is that <u> tags are deprecated in XHTML and HTML5, so it would need to produce something like <span style="text-decoration:underline">this</span>. (IMHO, if <u> is deprecated, so should be <b> and <i>.) Note that Markdown produces <strong> and <em> instead of <b> and <i>, respectively, which explains the purpose of the text therein instead of its formatting. Formatting should be handled by stylesheets.

Update: The <u> element is no longer deprecated in HTML5.

查看更多
啃猪蹄的小仙女
5楼-- · 2020-05-14 07:20

Markdown doesn't have a defined syntax to underline text.

I guess this is because underlined text is hard to read, and that it's usually used for hyperlinks.

查看更多
Juvenile、少年°
6楼-- · 2020-05-14 07:26

The simple <u>some text</u> should work for you.

查看更多
【Aperson】
7楼-- · 2020-05-14 07:37

You can wrote **_bold and italic_** and re-style it to underlined text, like this:

strong>em,
em>strong,
b>i,
i>b {
    font-style:normal;
    font-weight:normal;
    text-decoration:underline;
}
查看更多
登录 后发表回答