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
19
votes
8 answers

Underline Text in Tkinter Label widget?

I am working on a project that requires me to underline some text in a Tkinter Label widget. I know that the underline method can be used, but I can only seem to get it to underline 1 character of the widget, based on the argument. i.e. p =…
Zac Brown
  • 5,905
  • 19
  • 59
  • 107
19
votes
7 answers

CSS decrease space between text and border

When hovering a link I want it to get an underline. The underline should be 2px strong and 4px below the text. With text-decoration: underline I get a 1px strong line which is 4px below. (Distances vary by font) If I write border-bottom: 2px solid…
obs
  • 797
  • 3
  • 14
  • 37
17
votes
8 answers

CSS Text underlining too long when letter-spacing is applied?

Whenever letter-spacing is applied to something with an underline or a bottom border, it seems like the underline extends beyond the text on the right. Is there any way to do prevent the underline from extending beyond the last letter in the…
waffl
  • 5,179
  • 10
  • 73
  • 123
17
votes
1 answer

How to underline text in a plot title or label?

I can't seem to figure out how to underline any part of a plot title. The best I could find was annotate("segment") done by hand, and I have created a toy plot to illustrate its method. df <- data.frame(x = 1:10, y = 1:10) rngx <- 0.5 *…
lawyeR
  • 7,488
  • 5
  • 33
  • 63
16
votes
3 answers

Why is vim drawing underlines on the place of tabs and how to avoid this?

Without any specific regularity my vim displays underlines on the place of tabs (see below). Sometimes it also happens to the text: I type and it's underlined. What could be a reason?
lyuba
  • 6,250
  • 7
  • 27
  • 37
16
votes
5 answers

how to remove underline for textview in android

I have seen many questions regarding removing of underline for autolink of textview. But for me, I am unable to remove underline for normal textview. I set the underline by: textview.setPaintFlags(nameOnTemplateTextview.getPaintFlags() |…
Sai Korlakunta
  • 163
  • 1
  • 1
  • 5
15
votes
5 answers

Wavy underlines in a FlowDocument

In WPF, is there an easy way to add wavy underlines (like spelling errors in Word) to FlowDocument elements? There's the Underline class, but there seems to be no way to style it.
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
15
votes
7 answers

Make a string clickable, underlined in a TextView

I want to make the string "this link" underlined and clickable, but I don't know how to achieve that. XML file: Before you submit, please check out <u>this link</u> In my…
Zbarcea Christian
  • 9,367
  • 22
  • 84
  • 137
14
votes
5 answers

How can I create custom underline or highlight for text in html or css?

I'm trying to figure out how to create a custom background effect for text. In other words, how can I make something like this:
Luka Gavasheli
  • 153
  • 1
  • 1
  • 4
14
votes
4 answers

What is the Constant Value of the Underline font in Java?

What is the Constant Value of the Underline font in Java ? Font.BOLD bold font Font.ITALIC italic font What is the UNDERLINE font Constant ? I try all the available constants but it didn't work .
Waseem
  • 11,741
  • 15
  • 41
  • 45
14
votes
2 answers

Underlining lines in full width, not only text

Hi,I'm currently trying to set something up with HTML/CSS that looks like a post-it note. An Image of what I'm aiming at Please note that every line should be underlined, no matter how many characters are in that line. Also every new line should be…
trootnet
  • 141
  • 1
  • 1
  • 4
13
votes
1 answer

Underline css3 transition

How do I create an underline animation from left to right on hover in CSS3?
ziltoid
  • 141
  • 1
  • 1
  • 4
12
votes
1 answer

Dotted underlines don't render properly in Chrome

Using Chrome 65, it looks like the text-decoration: underline dotted; yields an unelegant result : Whereas on Firefox, i'm getting the expected outcome : What's wrong with chrome ? I expanded the snippet with a further test. It seems to only fail…
Brachamul
  • 1,886
  • 2
  • 21
  • 34
11
votes
2 answers

TextInput underline color for ios in react-native

i am doing mobile applications in react-native for android and ios. In my project i am using TextInput Component(ios). This component appear without underline. How to use TextInput with underline color in ios. code sample -
Sathish Sundharam
  • 1,060
  • 2
  • 12
  • 22
11
votes
3 answers

Android Spinner Underline color

I can add underline in spinner using style="@style/Base.Widget.AppCompat.Spinner.Underlined". How can I change the color of the underline using style only? I don't want to use any drawable file to change this.
1 2
3
39 40