# Feature Request: underline text

**URL:** <https://talk.commonmark.org/t/feature-request-underline-text/343>\
**Category:** Spec\
**Created:** [September 4, 2014, 4:31pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343 "2014-09-04T16:31:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dClauzel](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/dclauzel/32/93_2.png) [@dClauzel](https://talk.commonmark.org/u/dClauzel)\
**Post date:** [September 4, 2014, 4:31pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/1 "2014-09-04T16:31:38Z")

</div>

It would be nice to have a support for underlining text. It is a complement to strong, italic, and strike.

The html tags `<u>`bla`</u>` exist, and can be used to represent text that should be stylistically different from normal text.

---

<div class="post-metadata">

**Author:** ![zzzzBov](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zzzzbov/32/218_2.png) [@zzzzBov](https://talk.commonmark.org/u/zzzzBov)\
**Post date:** [September 4, 2014, 5:44pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/2 "2014-09-04T17:44:31Z")

</div>

Markdown already supports this element:

```
<u>here's an example!</u>

```

In all seriousness, the `<u>` element is generally best avoided, [the spec explicitly says so](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-u-element)

> In most cases, another element is likely to be more appropriate…

The purpose of markdown isn’t to make a 1:1 mapping of HTML features to simple syntax. The purpose is to provide a convenient manner for authoring text and provide coverage for the most commonly used features. Because of this, I don’t see any reason to add support for the `<u>` element to the standard spec.

It might be worthwhile as an optional extension, along with support for `<cite>`, `<dfn>`, `<abbr>`, `<q>`, `<small>`, and a number of other less commonly used elements.

---

<div class="post-metadata">

**Author:** ![dClauzel](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/dclauzel/32/93_2.png) [@dClauzel](https://talk.commonmark.org/u/dClauzel)\
**Post date:** [September 4, 2014, 7:54pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/3 "2014-09-04T19:54:05Z")

</div>

Bold, italic, underline, and strike have been the basic formatting possibilities since (at least) the BBS. Even today, it is common to see people marking some text for `*importance*`, `/implicit meaning/`, the `_Title_of_a_movie_`, or for providing `-corrections-` modifications.

Supporting those 4 basics formatting styles would just ensure the continuity of practice.

---

<div class="post-metadata">

**Author:** ![zzzzBov](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zzzzbov/32/218_2.png) [@zzzzBov](https://talk.commonmark.org/u/zzzzBov)\
**Post date:** [September 4, 2014, 8:37pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/4 "2014-09-04T20:37:44Z")

</div>

My point was that it _does_ support those formatting styles. What it doesn’t do is provide a shorthand for underlined text.

Not providing a shorthand is not the same as not supporting the feature at all.

---

<div class="post-metadata">

**Author:** ![matze](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/matze/32/55_2.png) [@matze](https://talk.commonmark.org/u/matze)\
**Post date:** [September 4, 2014, 8:39pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/5 "2014-09-04T20:39:53Z")

</div>

Underlining has been in use since typewriters couldn’t emphasize text otherwise. Now, we can emphasize with _italics_, **bold** and **_bold italics_** and thus underlining is not necessary but merely an historical artefact. By the way, your list of semantic modifications lacks some statistic background. And as said before by others, there’s always the HTML fallback.

---

<div class="post-metadata">

**Author:** ![Zegnat](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zegnat/32/182_2.png) [@Zegnat](https://talk.commonmark.org/u/Zegnat)\
**Post date:** [September 4, 2014, 9:29pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/6 "2014-09-04T21:29:12Z")

</div>

Let me weigh in by pointing out something that hasn’t been touched on here before.

> Bold, italic, underline, and strike have been the basic formatting possibilities since (at least) the BBS.

The spec never mentions the words “italic” or “bold”. These are not actual features of the Markdown syntax. Instead there is “emphasis” and “strong emphasis”. Neither does Standard Markdown specify that these must be styled with italics and bold styles respectively.

Markdown offers no way to “represent text that should be stylistically different from normal text” (maybe it should?) so there is nothing in Markdown that would be complemented by adding an additional syntax to support something as specific as underlining text.

Instead you could set your renderer to mark emphasis by underlining rather than any other styling. In the case of HTML this would be done by setting custom CSS.

---

<div class="post-metadata">

**Author:** ![bnb](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/bnb/32/72_2.png) [@bnb](https://talk.commonmark.org/u/bnb)\
**Post date:** [September 4, 2014, 9:36pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/7 "2014-09-04T21:36:10Z")

</div>

> [@Zegnat](#):
>
> The spec never mentions the words “italic” or “bold”. These are not actual features of the Markdown syntax. Instead there is “emphasis” and “strong emphasis”. Neither does Standard Markdown specify that these must be styled with italics and bold styles respectively.

True, but it’s a standard that one `_` and `*` mean italics, and two mean bold. People would be angry if you switched those meanings around in all current implementations. It’s the standard way to do it. Because it’s not in the spec _now_ doesn’t mean it shouldn’t be.

---

<div class="post-metadata">

**Author:** ![mex](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mex/32/260_2.png) [@mex](https://talk.commonmark.org/u/mex)\
**Post date:** [September 4, 2014, 11:24pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/8 "2014-09-04T23:24:27Z")

</div>

I would rather consider it a common misconception than a standard that `_`/`*` should mean italic and `__`/`**` should mean bold.

The emphasis translates into the emphasize tag (`<em>`), while the strong emphasis translates into the strong tag (`<strong>`). Notably not being translated into neither `<i>` nor `<b>` for the exact reasons Zegnat mentioned above.

---

<div class="post-metadata">

**Author:** ![chrisalley](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/chrisalley/32/906_2.png) [@chrisalley](https://talk.commonmark.org/u/chrisalley)\
**Post date:** [September 6, 2014, 6:09am UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/9 "2014-09-06T06:09:33Z")

</div>

As a web designer, you can easily make text underlined with some simple CSS like this:

```auto
<style type="text/css">
  em {
    text-decoration: underline;
  }
</style>

```

`*emphasis*` can then be written in Markdown normally by the content writer, but styled differently for the particular website that it is used on.

I’m opposed to presentational elements in either HTML or Markdown because they violate the separation of concerns principle. It is the web designer’s job to decide how content is presented, not the content writer’s.

---

<div class="post-metadata">

**Author:** ![mofosyne](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [October 18, 2014, 3:33am UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/10 "2014-10-18T03:33:18Z")

</div>

Does anyone even use `_` in place of `*` in `*italic*` or ` **bold** `? If we can get a corpus of current markdown comments, I would like to know the amount of usage of `_`. I’m guessing not enough people is using it enough, and could be used for underlining purpose without much harm.

(I personally never used `_`, never seen the point. But I can see the usefulness of underlining or highlighting like `_this_text_is_underlined_`. )

I think if you want to implement stuff useful for reviewing, check out [http://criticmarkup.com/](http://criticmarkup.com/) for inspiration

---

<div class="post-metadata">

**Author:** ![chrisalley](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/chrisalley/32/906_2.png) [@chrisalley](https://talk.commonmark.org/u/chrisalley)\
**Post date:** [October 18, 2014, 12:38pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/11 "2014-10-18T12:38:25Z")

</div>

I always use `*` for emphasis as well. `_` looks jarring in the middle of a sentence, `__` for strong emphasis even more so.

There are at least a couple of issues with changing the meaning of `_` though:

1. It will break (many?) existing Markdown documents.

2. Underlining is presentational information. I realise that the HTML5 spec changes the meaning of `<u>` but this is quite confusing, and causal writers would probably think that the text should _appear_ underlined.

From [the HTML5 spec](http://www.w3.org/TR/html5/text-level-semantics.html#the-u-element):

> The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt.

If this meaning of `<u>` is to be supported (in some form) I would like to see some real world examples of it’s necessity. The HTML5 versions of `<b>`, `<i>`, and `<u>` all seem unnecessary and likely to cause confusion with their former presentational meanings.

---

<div class="post-metadata">

**Author:** ![mofosyne](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [October 18, 2014, 3:27pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/12 "2014-10-18T15:27:50Z")

</div>

> Underlining is presentational information. I realise that the HTML5 spec changes the meaning of `<u>` but this is quite confusing, and causal writers would probably think that the text should appear underlined.

Fair enough. Another approach could be just to define a set of separate class and avoid the `<u>` tag entirely. Or we can just stay practical, and know that in the real world, most browser is unlikely to diverge from treating `<u>` as underlined text.

There is the language of w3, and the is the language of real world users. We should strive to keep to w3 as much as possible, but don’t forget our Ghetto roots and lets not be afraid to break away as needed.

* * *

Btw here’s another approach to underlining as covered in [http://talk.commonmark.org/t/highlights-strikeout-underlines/](http://talk.commonmark.org/t/highlights-strikeout-underlines/)

`>> __underlined text__ <<`

> [@Highlights, Strikeout, Underlines, Spoilers](https://talk.commonmark.org/t/highlights-strikeout-underlines-spoilers/825/1):
>
> 3.\>\>\_\_ underlined text \_\_\<\< using \<u\> - Underline Thread

---

<div class="post-metadata">

**Author:** ![chrisalley](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/chrisalley/32/906_2.png) [@chrisalley](https://talk.commonmark.org/u/chrisalley)\
**Post date:** [October 18, 2014, 3:38pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/13 "2014-10-18T15:38:38Z")

</div>

> [@mofosyne](#):
>
> Another approach could be just to define a set of separate class and avoid the \<u\> tag entirely.

Agreed. I think it largely depends on why you’re making the text underlined. That reason will often correlate to a semantic meaning, and the web would be better off using the appropriate tag (`<cite>`, `<em>`, etc) instead.

---

<div class="post-metadata">

**Author:** ![mofosyne](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [October 18, 2014, 3:44pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/14 "2014-10-18T15:44:24Z")

</div>

Okay I’ll shall check out of this discussion then, in regards to html representation. Since it’s getting out of my experience. I’ll say tho that if given a choice, I’ll just go the rebel route and use `<u>`, since I want it to show up even if there is no CSS available.

Anyway, I’ll be in [http://talk.commonmark.org/t/highlights-strikeout-underlines/](http://talk.commonmark.org/t/highlights-strikeout-underlines/) to recommend the `>><<` format for highlighting, strikeouts, and underlining. Which I think is an elegant way of not screwing the parser with conflicting edge cases.

---

<div class="post-metadata">

**Author:** ![vitaly](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/vitaly/32/396_2.png) [@vitaly](https://talk.commonmark.org/u/vitaly)\
**Post date:** [October 25, 2014, 7:22am UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/15 "2014-10-25T07:22:49Z")

</div>

Underline is presentation and not semantic. Also note, that `<ins>` (suggested as ++inserted++) is shown underlined by default.

---

<div class="post-metadata">

**Author:** ![arve0](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/arve0/32/1038_2.png) [@arve0](https://talk.commonmark.org/u/arve0)\
**Post date:** [November 26, 2016, 10:43am UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/16 "2016-11-26T10:43:00Z")

</div>

For fun, I created the plugin [markdown-it-underline](https://www.npmjs.com/package/markdown-it-underline).

---

<div class="post-metadata">

**Author:** ![Erquint](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/erquint/32/2321_2.png) [@Erquint](https://talk.commonmark.org/u/Erquint)\
**Post date:** [September 20, 2021, 8:16pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/17 "2021-09-20T20:16:01Z")

</div>

More and more people are using or trying to start using Markdown for creative work but stumble into this issue, seeing it as a limitation.  
You try telling a blogger or a book author that underlining must not have a shorthand because it’s not semantic, despite prolific use in publishing and typography.

As well I’ve seen people struggling to use Markdown in manual digitizing of paper media and, you guessed it, — it’s full of underlining.  
Tell them they don’t need it because W3C decided to have a mid-life crisis.  
When trying to emphasize a piece of writing with pen and paper, there’s nothing more intuitive and shorthand than underlining it.

If you include unconscious users of Markdown on various Markdown-enabled platforms, **Markdown is presentation** for most of its users. Just as with HTML, which Markdown is a shorthand to.

I’ve been personally running into this snag ever since Markdown became a thing.  
Got in the way of producing an ebook, gets in the way of blogging…  
This technicality-based “non-semantic” excuse has very little to do with organic use cases.  
Not to mention that in my own usage of bold, italic and underlined I assign separate semantic function to each.

P.S. Discord had underlines in its own flavor forever as ` __underline__ ` and it’s been the sole respite.

---

<div class="post-metadata">

**Author:** ![danielgrad](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/danielgrad/32/2395_2.png) [@danielgrad](https://talk.commonmark.org/u/danielgrad)\
**Post date:** [January 13, 2022, 6:33pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/18 "2022-01-13T18:33:03Z")

</div>

> [@Erquint](#):
>
> More and more people are using or trying to start using Markdown for creative work but stumble into this issue, seeing it as a limitation.

People should familiarize themselves with current style guidelines if they’re in creative work.

> [@Erquint](#):
>
> You try telling a blogger or a book author that underlining must not have a shorthand because it’s not semantic, despite prolific use in publishing and typography.

There’s no prolific use of underlines in modern publishing. Style guides recommend italics for emphasis (which should be kept to a minimum) and strongly discourage the use of underlining except for very specific purposes (like transcribing a handwritten letter)

**MLA Style**

> In MLA style, you should italicize (rather than underline) the titles of books, plays, or other standalone works. You should also italicize (rather than underline) words or phrases you want to lend particular emphasis—though you should do this rarely.

**CMoS**

> Change underlining to italics. Some underlining, however, may be intended  
> to represent true underscore—in, for example, a collection that transcribes  
> handwritten letters; this should be preserved, with a note to the publisher explaining  
> the exception.

> Occasionally, boldface or underscore (also called underlining) is used for emphasis. In formal prose, especially in print, italics are usually more appropriate.

---

<div class="post-metadata">

**Author:** ![Mr\_DJA](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mr_dja/32/1758_2.png) [@Mr\_DJA](https://talk.commonmark.org/u/Mr_DJA)\
**Post date:** [January 24, 2022, 3:38pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/19 "2022-01-24T15:38:57Z")

</div>

What @danielgrad said is nonsense!

1. There is no global consensus about _style guidelines_, it differs by country, language, culture…
2. If you want markdown to stay universal, stop thinking of it as if it is only used to write text in English.

There are 2 proposed syntaxes for the inserted/underlined text:

1. ` __text__ ` (adopted by Discord)
  - Pros:
    - Good backward compatibility with old documents as we don’t actually add a new tag.

  - Cons:
    - It will replace an existing tag (` __bold__ `), and ` **bold** ` will become the only way to write bold text (which can be considered as a breaking change?).

2. `++text++` (as suggested by @vitaly)
  - Pros:
    - Very simple and descriptive.

  - Cons:
    - A new markdown tag === breaking change.

Choose wisely.

---

<div class="post-metadata">

**Author:** ![dClauzel](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/dclauzel/32/93_2.png) [@dClauzel](https://talk.commonmark.org/u/dClauzel)\
**Post date:** [January 24, 2022, 5:06pm UTC](https://talk.commonmark.org/t/feature-request-underline-text/343/20 "2022-01-24T17:06:50Z")

</div>

> [@Mr\_DJA](#):
>
> - There is no global consensus about _style guidelines_, it differs by country, language, culture…
> - If you want markdown to stay universal, stop thinking of it as if it is only used to write text in English.

I cannot agree more. Being French, and writing in French (not here obviously 😊) it is very clear that the _semantic_ of the writing is different is both languages.

CommonMark should not be about semantic but representation. There are already plenty of semantically descriptive languages ( SGML, for example), no need to create another one.

[Next page](https://talk.commonmark.org/t/feature-request-underline-text/343.md?page=2)
