Get Underlined Text with Markdown
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? 9 Answers in Github Markdown Text...
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?
9 Answers
In GitHub markdown <ins>text</ins> works just fine.
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.
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.
The simple <u>some text</u> should work for you.
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;
}
In Jupyter Notebooks you can use Markdown in the following way for underlined text. This is similar to HTML5: (<u> and </u>).
<u>Underlined Words Here</u>
(this answer rewritten since the downvotes)
Must Read
Just use the HTML <u> tag (recommended) or the <ins> tag inside your markdown for this.
The HTML tag <ins> is the HTML "insert tag", and is usually displayed as underlined. Hence, you can use it for underlining, as @BlackMagic recommends in his answer here. It is the opposite of the <del> delete tag.
But, I'd prefer and I recommend to just use the HTML <u> underline tag, since that's exactly what it's for:
<u>this is underlined text in HTML or markdown, which accepts HTML</u>
@zed_0xff also recommends using the <u> tag in his answer here.
You can try it out live online here: .