I am trying to post a quote as part of a question. The quote includes a portion of a sentence that is underlined and I can't see how to do that here. It isn't under Styling/Headers, and I've tried [u]underline[/u] and that also didn't work. What is the formatting for underline here? Thanks
3 Answers
Underlining is not supported in user posts.
One reason is that underlining in web pages is customarily used for links, and your text would [probably] not be a link. The other reason is that the designers don't like it: underlining isn't used in any Stack Exchange site, as far as I am aware — even for links.
Normally, it's acceptable to find some other form of emphasis. If underlining is only used to draw attention to a few words, then bold or italic will do just as well. However, there are conventions there too: italic is used for mentions of a word, and bold is preferred for emphasis.
Dan Bron has already commented about using the >
character as a prefix for a quoted paragraph. Within the quote, you can use any of the available forms of emphasis. But underlining is not one of them.
Note: many user agents/operating systems can have problems with special Unicode characters such as those which include or combine to make an underline, or provide small capitals or whatever. Please don't use them. For example, although ̲a
appears fine in a monospaced font, it probably doesn't look right in Georgia as used for the body text in this site: ̲a. It certainly doesn't look right in my browser — this is what I see:
-
Of course, since this post, underlining has appeared for links. But the underlying reason for not allowing plain underlining still holds: it's [now] reserved for links.– Andrew Leach ModCommented Aug 15, 2021 at 8:16
Underlining is used to designate links. That's all. If you need something, you can use the wealth of options that are supported in posts such as bold, italics, headers, block quotes, or even just regular "quoting". (Many of these can be combined too.)
You should not use Unicode hacks to try to include underlining because it causes problems for accessibility:
- It complicates copying and pasting. Depending on where you're typing, you can't get rid of the Unicode easily and you're forced to retype it all.
- It breaks many translation tools (e.g. Google Translate, the translate option in iOS).
- It breaks popup dictionaries.
- Not all fonts may support it. (Other times it just looks ugly, though that's more of an aesthetic problem.)
- It's liable to be confused with links.
- Best case scenario for screen readers (or any TTS) is that it ignores the Unicode underlines, causing minor confusion. (That's what happens with Voice Over, at least for text that uses combining characters, since there are regular letters in there.) Worst case scenario is that it makes the entire word unintelligible.
- Digression: Screen readers don't tell you when anything is underlined (as websites can use CSS to apply underlining). Why is underlining links recommended for accessibility then? It's purely for people who navigate the web visually, since a screen reader will say the word "link" either before or after it says the text of the link.
See also my answer on Meta SE about other Unicode characters.
Workaround
Underlining is in enough demand that other users have found workarounds, such as the use of combining character U+0332 described here at Meta.
-
7Don't do this! It interferes with the assistive technology that some people need to use in order to use the site (e.g. screen readers, text to speech, translators, dictionaries).– Laurel ModCommented Apr 30, 2022 at 2:14
-
1@Laurel — How is this any different from the use of other combining characters, such as diacritics? Honest question. Commented Apr 30, 2022 at 2:18
-
2Because those are expected to be in the word. For example both "cafe" and "café" bring up the same dictionary entry for me (in NOAD via iOS).– Laurel ModCommented Apr 30, 2022 at 2:28
-
1@Laurel, I'm curious, your comment to me appears with é as a precomposed glyph, i.e. as single code-point U+00E9, and not as e + combining acute U+0301. Combining characters such as the combining acute U+0301, or the combining underline U+0332, are separate glyphs that are rendered within the same on-screen space as the preceding character. I have no idea what "NOAD" is, I'm afraid, so I cannot evaluate whether "cafe" (plain ASCII) and "c̲a̲f̲e̲" (ASCII + combining underline) return the same results. I can confirm that googling for "c̲a̲f̲e̲" returns results for "cafe" as well. Commented Apr 30, 2022 at 4:10
-
Some languages like Navajo apply multiple diacritics per letter, such as ą́ (small a with ogonek U+0105 + combining acute U+0301), used to represent a nasal a with high tone. The use of separate combining diacritics is (currently) the only way to compose these glyphs, since there are no dedicated single-glyph Unicode entries for these. Depending on your font settings and browser, this ą́ might appear as a proper single character, or as a bit of a mess with the diacritic not properly over the letter. In my Firefox v91.8.0esr, the edit box is correct, but not the rendered comment Commented Apr 30, 2022 at 4:15
-
From what I've read about Unicode equivalence and normalization, I believe that the combining underline is effectively treated as optional and functionally equivalent to the preceding glyph in isolation. So strings like "c̲a̲f̲e̲", consisting of c + U+0332 + a + U+0332 etc., should be treated as functionally equivalent to "cafe" (just the ASCII string). By my current understanding, any assistive technology that is Unicode-compliant should not be negatively impacted by this workaround for underlining. Commented Apr 30, 2022 at 4:24
-
2Your underlining interferes with my iOS dictionary (NOAD = New Oxford American Dictionary), the iOS translation option, and Google translate. Those are just the applications I checked.– Laurel ModCommented Apr 30, 2022 at 13:38
-
@Laurel, very interesting. My sense is that all of this additional info should be rolled up into the answer post. These findings also appear to bolster the case for Stack Exchange supporting proper CSS underlining, which has no such usability impact on text processing, as determined users will use this U+0332 character or some other workaround. Commented May 2, 2022 at 18:27
>
. There is no provision for underlining in StackExchange. Unicode contains some pre-underlined characters, so you can use those, and there are even online services that let you type a text and they will replace all the characters with their underlined counterparts, where they exist, so you could find one of those and use it to create texts to be pasted here. But he result is usually very unpleasant-looking. Better to stick with blockquotes. Also this question is about the site, so belongs on [Meta].<u>underlined text</u>
would work—but that’s disallowed, I guess for the reasons indicated in Andrew Leach’s answer.