Is it possible to underline text in Markdown? Well, yes and no. Standard markdown does not support underlining, but there are some ways around this. The most widely supported is to use HTML tags directly within the markdown itself.
Specifically <u>
, <ins>
, and <span>
tags can be used within markdown to underline text.
Let's create some simple examples using the <u>
, <ins>
, and span
HTML tags below to write "this text is underlined".
<!-- using <u> -->
This <u>text</u> is underlined
<!-- using <ins> -->
This <ins>text</ins> is underlined
<!-- using <span> -->
This <span style="text-decoration:underline">text</span> is underlined
📒 Note:
<span>
also requires the use of inline CSS.
Support and syntax for underlining text without HTML with vary by platform and library. Some apps like Bear or libraries markdown-it will natively support underlining text. For generic markdown support HTML tags must be used.