Get underlined text with Markdown

前端 未结 7 974
名媛妹妹
名媛妹妹 2021-01-30 02:35

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?

相关标签:
7条回答
  • 2021-01-30 03:15

    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.

    0 讨论(0)
  • 2021-01-30 03:16

    Both <ins>text</ins> and <span style="text-decoration:underline">text</span> work perfectly in Joplin, although I agree with @nfm that underlined text looks like a link and can be misleading in Markdown.

    0 讨论(0)
  • 2021-01-30 03:22

    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;
    }
    
    0 讨论(0)
  • 2021-01-30 03:26

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

    0 讨论(0)
  • 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>

    0 讨论(0)
  • 2021-01-30 03:32

    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.

    0 讨论(0)
提交回复
热议问题