I am wondering why there is no markdown syntax for underline? I know that basic html tags can be embedded to achieve this but I am trying to understand why underline
got omitted when bold and italics exists

- 1,719
- 2
- 10
- 5
-
3a pure guess: cos underline is synonymous with links – jk. Aug 09 '13 at 09:47
-
7This question appears to be off-topic because it is about the choices made by one individual creating a textual markup language, not about programming. – Martijn Pieters Aug 09 '13 at 09:52
-
6@MartijnPieters still, markup is related to programming – Matsemann Aug 09 '13 at 11:07
-
1@Matsemann, This question is about an application domain and no more on topic than a question about accounting would be, even formulated in the context of an accounting program. – AProgrammer Aug 09 '13 at 12:13
-
28i dont agree with the off topic thing however, are you seriously saying that markdown is just as unrelated to programming than accounting software? Do you use markdown? if you did you would probably not say that, and where is this. I would say the closer of off topic-ness is primarily opinion based in the first place. It didn't hurt anything and the question was answered. The ops need to get off their high horses and the users need to stop being afraid of the ops just because they fear for loss of their precious rep points. (Which is why I have so little, hehe) – osirisgothra Jun 13 '15 at 17:34
-
9Thanks for bringing this up. I don't feel that this is off-topic. I do agree that it is not directly related to Software Development but I see markdown files in almost all open source projects for README, LICENSE etc. Moreover, I was just curious about why programmers has left out underline which was well answered by `Edd`. – ganessh Jun 13 '15 at 18:00
1 Answers
There are no mention of "bold" or "italics" in the markdown syntax document. What there is, is an emphasis section, which describes how the use of underscore and asterix -marked spans (*
, _
, **
, __
) should produce code wrapped in <em>
and <strong>
tags.
The reason for this, I presume, is that markdown is a markup language, like html, and should not be concerned with how the text is presented (that's the job of the styling/CSS), but to provide semantic meaning to the text. This is particularly useful for people who use non-graphical browsers, where the emphasis can be conveyed in other ways (Think about how a screen-reader could add emphasis when it encounters an <em>
tag, or really add lots of emphasis in the case of the <strong>
tag).
I could well use CSS to style my emphasised text with underlines, rather than italics, but this is not the browser default in most cases.

- 1,532
- 1
- 10
- 11
-
7Bet it's related to html's [phrase elements](https://www.w3.org/TR/html401/struct/text.html#h-9.2.1): *EM and STRONG are used to indicate emphasis.... The presentation... depends on the user agent. Generally, visual user agents present EM text in italics and STRONG text in bold font.* See also [HTML5 on the `u` tag](https://www.w3.org/TR/html5/text-level-semantics.html#the-u-element): *The default rendering of the u element... clashes with the conventional rendering of hyperlinks (underlining). Authors are encouraged to avoid using the u element where it could be confused for a hyperlink.* – ruffin Jan 13 '16 at 18:40
-
2Well underlining in markup predates the web/hyperlinks, so how 'bout a lil' respect for us old guys :) Plus, Markup can be used in apps other than web-based (e.g. Rocket Chat desktop), and as a best practice, hyperlinks are best designated in conjunction w/ a color change (or increasingly prevalent, a color change and no underlining). I guess it all depends on what u mean by "presentation" (vs "content); does that include different HTML header sizes (H1, H2, etc.)? I guess as they say, it's not a "rigid guideline". – galaxis Jul 20 '18 at 14:10
-
5Emphasis and strong emphasis aren't the only things writers will do within a text. I want to use it to point the attention to a certain letter. How would you go about writing this in markup? "The correct capitalization is: Shotg̲un" – Mark Jeronimus Sep 15 '18 at 19:17
-
3Grr. I have the same use case as @MarkJeronimus. Someone committed and pushed a capitalized value in a case-sensitive config file, and I would love to be able to just underscore the character that caused the issue. – Spencer D Feb 27 '19 at 22:44
-
2Comments here are basically missing the point. Markdown is for generic markup of text and it is designed to mark text from a _semantic_ point of view. Whether links are changing color or not isn't inherent to their nature as a link but to the way they are usually presented. A link doesn't have color, its representation in an application might have. Same applies to handling single letters. If you want to "highlight" one character, you actually want to emphasize it, so do right **t**hat. If you dislike the way either emphasis is presented you should complain about the presenting tool/browser. – Thomas Urban Jul 09 '19 at 15:50
-
While this to some extent answers the question, it doesn't explain why there is a strikethrough, but not an underline. Both are a horizontal line with the content (a stylistic thing, rather than the semantic thing of em and strong). It is just that one is through the content, the other is underneath. If strikethrough is in the spec then why isn't underline? – Rik Schaaf Mar 13 '21 at 15:26
-
-
@RikSchaaf because "strikethrough" (as in `~~` isn't a "stylistic horizontal line", but very much has semantic meaning: "disregard this". the point isn't that both are lines (e.g. you (as in: the renderer / stylesheet designer) could as well use stylized "garbly letter background" for striking something, etc). `~~` doesn't mean "make a line here `
`", it means "redacted `– nonchip Mar 01 '22 at 07:02`". just like `*` doesn't mean "italicize this ``" but "this is kinda important ``". and `**` doesn't mean "bold ``" but "this is more important than `*` ``". better question would be: where's ``? -
-
@ThomasUrban Underlining has a history far pre-dating computers. It is sometimes absolutely necessary. In either case it's up to the author. Hyperlinks have no color? They also don't have underlines. Both of those may be commonly used to show context, and sometimes bold is used even. Hyperlinks don't have to be shown by styling at all. It's just data that does something when you click on it. Nowadays sometimes none of those are used. It's about presentation, and that is absolutely up to _the author_. As it should be. – jdmayfield Oct 23 '22 at 06:51
-
@jdmayfield I don't get your point that clearly for you seem to second my comment at least partially, but seem to oppose it in other parts of your comment. Markdown does not have color either though using colored text predates computers by far as well. Just think of books written by monks centuries ago. So, what's the point? You have three levels of emphasizing a text passage in markdown. That's it. If you want one of them to show up as underlined text like in ancient books, just fix the way markdown text is rendered e.g. in a browser by adjusting the applied CSS. – Thomas Urban Oct 25 '22 at 22:19