Get underlined text with Markdown

萝らか妹 提交于 2019-12-03 04:00:43

问题


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?


回答1:


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.




回答2:


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.




回答3:


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




回答4:


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




回答5:


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;
}


来源:https://stackoverflow.com/questions/3003476/get-underlined-text-with-markdown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!