Questions tagged [underline]

An underline is a more or less horizontal line immediately below a portion of text. Generally, it is used to emphasize keywords or important passages. Not to be confused with "underscore", which is used for the character "_".

Underline in CSS

In CSS, underlining is created by setting the property "text-decoration" to "underline" (other line types, like strikethrough or overline, are also possible). The property "text-decoration-style" defines the appearance of the underline (e.g. solid, dotted, wavy). In CSS3, underline color can be defined by "text-decoration-color" to be different from the text color. For more information, see w3schools.com.

Underline in HTML

HTML has a presentational element <u> for underlined text. However, it was deprecated in HTML 4.01 in favor of CSS; in HTML5 it was redefined for text that should be "stylistically different" (cfr. w3schools.com).

Underline in Unicode

In Unicode, underline can be created by the combining diacritic "combining low line" (U+0332, "◌̲ ").

Underline in ASCII

In plain-text (ASCII) environments, underlining is often indicated by surrounding underscore characters, e.g. "This text is _underlined_."

596 questions
60
votes
3 answers

IntelliJ IDEA underlines variables when using += in JAVA

Since the new update (2018.2) IntelliJ IDEA underlines variables, when they are "unnecessarily" reassigned - this includes, however, each use of "+=". Is this a mistake in the IDE or am I getting it wrong? Please see this basic method as an example.…
fandango
  • 603
  • 1
  • 5
  • 6
50
votes
4 answers

Android spinner with underline appcompat

I am using a appcompat theme for my application. Need to know how i can show underline to spinner. It is just showing anchor. I tried setting up underline using android:background but it makes the anchor disappear.
Pritam Kadam
  • 3,203
  • 4
  • 19
  • 41
39
votes
2 answers

space between text and underline

i am using text-decoration:underline; but text and underline are touching each other.can i increase space between text and underline? this one. i want to make space between text and underline.
Kali Charan Rajput
  • 12,046
  • 10
  • 35
  • 46
33
votes
14 answers

Changing Underline color

I have this code here: echo "
$username
"; Firstly, as you can see, it's underlined (< u >). Second, all text is all red. Well is there anyway to leave the text ($username) red but the underline black?
user1641508
  • 325
  • 1
  • 3
  • 4
32
votes
4 answers

Change TextField's Underline in Flutter

I'm working on an application using Flutter SDK. When I use a TextField widget, and I focus it, the underline becomes blue. I need to change this color to red, how can I do it? Screenshot of what I need to change. I want just the underline to…
Tiziano Gioè
  • 683
  • 2
  • 7
  • 8
30
votes
2 answers

How to underline text in reStructuredText?

Of course, on the web an underline denotes hyperlink, but what if I need underline which is not a hyperlink?
Alex Bolotov
  • 8,781
  • 9
  • 53
  • 57
30
votes
4 answers

NSUnderlineStyleAttributeName Underline spacing

I want the underline to be below the text like any other normal underlining mechanism. However, with NSAttributed string it leaves holes with "g's" and "y's" example: How it should look: How can I increase the spacing between the underline and…
MobileMon
  • 8,341
  • 5
  • 56
  • 75
29
votes
7 answers

How to make an underlined text in UILabel?

How can I make an underlined text in UILabel? I had tried by making a UILabel with height 0.5f and place it under the text. This line label is not visible when I am running my app in iPhone 4.3 and iPhone 4.3 simulator, but it is visible in iPhone…
Dev
  • 3,885
  • 10
  • 39
  • 65
27
votes
3 answers

How to make Label Text Underline?

How can I make Label text Underline in WPF? I am stucked and could not find any property for underline:
Hassaan
  • 3,931
  • 11
  • 34
  • 67
24
votes
7 answers

Round cap underline in CSS

Can you make round cap underlines (as in the above image) with CSS? How? Is there a way to do this with border-bottom? border-radius produces this stylish effect instead:
hpique
  • 119,096
  • 131
  • 338
  • 476
22
votes
2 answers

CSS underline less than width of headline?

Is it possible with CSS to make the underline of a headline less wide than the headline text? I have the following style for an H1 headline: h1 { font-weight: 300; display: inline-block; padding-bottom: 5px; border-bottom: 1px #d2202f…
therealbiglou
  • 263
  • 1
  • 3
  • 15
21
votes
4 answers

A wavy underline in CSS

Can I create a wavy underline as this : I can only get a solid border : .err { border-bottom:1px solid red; display: inline-block; }
A boy whose name was Peter was
woking
down the street
Amelie P
  • 231
  • 1
  • 2
  • 4
20
votes
7 answers

Disable underline for lowercase characters: g q p j y?

Sometimes you don't want an underline blindly cutting through an underlined page title! Is there a way to automatically elegantly disable underline for certain lowercasee characters? In these cases it's nicer not to underline these lowercase letters…
Sam
  • 15,254
  • 25
  • 90
  • 145
19
votes
6 answers

Stop link's :before content from being underlined by rule applied to the link

I have a text link that is underlined when hovered. I'm adding at the beginning of the link a > symbol using the following code: .box.blueb a { color: #0098aa; } .box.blueb a:hover { text-decoration: underline; } .box.blueb a:before { content: "> ";…
Scott
  • 3,967
  • 9
  • 38
  • 56
19
votes
5 answers

Text with multiple underlines

My application is that it is some online document to which user can annotate and underline the text for reference. Now this can be done by multiple users, hence need to have different colors for each underline. So basic requirement is that I need to…
pravid
  • 719
  • 9
  • 27
1
2
3
39 40