Why Markdown has no underline
On the web, underlined text means a link. Markdown was made for writing web pages, so it left underline out to avoid confusion. Bold and italic do the job of emphasis instead.
<ins> or <u>?
| Tag | Means | Shows as |
|---|---|---|
<ins> | Text that was added | Underlined |
<u> | Text marked as different, like a misspelled word | Underlined |
Both look the same. GitHub's own guide uses <ins>. For simply making text
stand out, bold or italic is usually the better choice.
Underline with bold or italic
Put the Markdown symbols outside the tag, or inside it. Both work.
You write
**<ins>Bold and underlined</ins>** and *<ins>italic and underlined</ins>*.You see
Bold and underlined and italic and underlined.
Underline a heading
Wrap the heading text, not the #.
You write
## <ins>An underlined heading</ins>You see
An underlined heading
Where it does not work
- Apps that do not allow HTML. Some note apps show the tags as text.
- Chat apps. Slack and Discord do not read HTML. Discord has its own
underline instead:
__text__, which in Markdown everywhere else means bold. - Inside code. Backticks show the tags as typed.
What not to do
Do not use __double underscores__ expecting an underline. In Markdown they
make text bold:
You write
__This is bold, not underlined.__You see
This is bold, not underlined.
Questions
Is there a Markdown shortcut for underline?
No. Markdown has no underline symbol. Use <ins>text</ins>.
Does underline work on GitHub?
Yes, with <ins> or <u> in README files, issues and comments.
Why do double underscores make text bold?
In Markdown, two underscores on each side mean bold, the same as two
asterisks. Underline was never part of the syntax. Discord is the exception:
it uses __text__ for underline in its own messages.
Next
- Markdown text formatting, for bold, italic, highlight and more.
- Check your formatting in the reader, free and private.