How to make a word underline in Markdown

Viewed 47957

How to make a word underline in Markdown?

For example: bold = **bold** or __bold__, italic = *Italic* or _Italic_.

I have tried with 2 and 3 underscores, but it is not working. Also tried by taking the reference of markdown-it.js.

6 Answers

since markdown is a markup language and In fact you can use HTML/CSS inside it, the easiest way I've found so far is:

text here <span style="text-decoration: underline">underlined text</span> other text

Note: you can still use markdown syntax inside the <span> tag.

In Jupyter notebook, you can use the following to get underscored text

<u>underscored text </u>

you can just use HTML markups in mark down.

if you want to underline, italic or strong, use follows,

<u> this is underlined </u> 

<i> this is italic </i> 

<strong> this is strong </strong>

etc..

Just to complement on the answers, if you happen to be using Atom for the markdown, ++this++ won't work (unless perhaps if you install any package for that), but <u>this</u> will.

I have:

output:
   pdf_document:
      latex_engine: xelatex
      keep_tex: true

in-line, outside of chunk:

\underline{Text to Underline}

and it works just fine!

Related