Markdown underline

There is no Markdown syntax for underline, on purpose: underlined text on the web looks like a link. Use HTML where you really need it.

<ins>Underlined with ins</ins>

<u>Underlined with u</u>

_Underscores make italics, not underline._

Why no underline?

John Gruber’s original Markdown mapped emphasis to <em> and <strong> only. On the web underline signals a link, so an underlined phrase that isn’t clickable confuses readers.

Use HTML

<ins>text</ins> means “inserted text” and browsers underline it. GitHub allows <ins>. <u>text</u> also works in most renderers that pass HTML through, and it is valid HTML5 for non-textual annotation.

Where HTML is stripped

Chat apps, some wikis and comment systems sanitise HTML. There you cannot underline; use bold or italic for emphasis instead.

Underscores are not underline

_text_ is italic in every Markdown flavour. Discord is the exception: __text__ underlines there, but that is Discord’s own formatting, not Markdown.

Quick answers

How do you underline text in Markdown?
Use HTML: <ins>text</ins> or <u>text</u>. There is no native syntax.
Does underline work in a GitHub README?
Yes, with <ins>. GitHub keeps that tag.