14

Possible Duplicate:
Why can we format text with bold and italic but sideline the underline?

How can I underline text in my questions in Stack Overflow??

This is important for me to format object text like in

my:House

in OOP.

This workaround looks a bit stupid at times but maybe it is worth considering. It uses U+0332COMBINING LOW LINE—after each character to render it underlined

I could not combine a semicolon with an underline, so, these are the results.

t̲e̲x̲t̲
m̲y̲:H̲o̲u̲s̲e̲
 :̲

m̲y̲:̲H̲o̲u̲s̲e̲

m̲y̲:H̲o̲u̲s̲e̲

u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲ t̲e̲x̲t̲

u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲

Reference: Why can we format text with bold and italic but not underline?

10

Markdown doesn't have a defined syntax to underline text so to answer your question, you can't.

|improve this answer|||||
  • 6
    Not completely true, you can always use ascii underline - however it looks a bit odd when used on characters that have a part under the line (y,g,q,...) There are existing tools that will do this for you e.g. manytools.org/facebook-twitter/strikethrough-text example: n̲i̲c̲e̲ t̲e̲x̲t̲,̲ u̲g̲l̲y̲O̲n̲e̲ y̲,̲g̲,̲q̲,̲.̲.̲.̲ – jave.web Oct 11 '14 at 11:27
  • @jave.web That's actually awesome and better than nothing. – Kai Noack Dec 17 '17 at 13:15

Not the answer you're looking for? Browse other questions tagged .