Markdown cheatsheet · Underline
How to underline in markdown
Markdown has no underline syntax, and that is not an oversight. On the web, underlined text means one thing: a link. So the syntax was left out, and you reach for HTML or bold instead.
The HTML escape hatch
Where inline HTML is allowed, two tags produce an underline. <ins> marks inserted text (as in a revision) and browsers underline it by default; <u> is the literal underline tag, with no meaning attached.
They are not equally portable. GitHub sanitizes the HTML in READMEs, issues, and comments against an allowlist, and ins is on that list while u is not: <ins>text</ins> comes out underlined, while a <u> tag is stripped and its text stays plain. Converters that pass raw HTML through untouched, which is what CommonMark specifies, render both.
Deadline is <ins>Friday</ins>.
Deadline is Friday.
<ins>. It survives GitHub's sanitizer, and it carries meaning: inserted text, the kind of thing revision marks underline anyway.Better alternatives
Underlining is a typewriter habit: it was how you emphasized a word on a machine that had no bold type. In print and on screen that job belongs to bold, which every renderer supports and which nobody mistakes for a link. For milder emphasis or titles, use italic. Both are two characters away: see bold and italic.
Where nothing works
Renderers that strip all inline HTML leave you with no underline at all: the tags are removed and the text stays plain, or they show up literally as typed. Many chat apps and comment systems work this way. Some invent their own shortcut instead; Discord underlines text wrapped in two underscores, which in standard markdown means bold. Those shortcuts live inside the one app and do not travel with the file.
Common questions
Why did markdown skip underline?
By design. Readers assume underlined text is clickable, so an underline syntax would make every document harder to scan, and emphasis was already covered twice over by italic and bold. The major flavors (CommonMark, GFM) have kept that decision.
Can I style it another way?
Only where you control the CSS of the rendered page. If you publish through your own site or export to HTML, you can restyle ins or add a class to a <span> and underline it yourself. In renderers you do not control, GitHub included, style and class attributes are stripped along with everything else that is not on the allowlist.