CSS Underline Generator

Underlining Big Text is cool right?

but it is also cool in small text, like this one. Yo, I'm underlined! See! You know what, I'm Iron-Man

CSS
.underline {
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-color: #78C00C;
text-decoration-thickness: 8px;
text-underline-offset: 11px;
}
Tailwind CSS class
underline decoration-["#78C00C"] decoration-solid decoration-[8px]underline-offset-[11px]
​​​​ ​ ​ ​ ​ ​ ​​
​​​​ ​ ​ ​ ​ ​ ​​
​​​​ ​ ​ ​ ​ ​ ​​
​​​​ ​ ​ ​ ​ ​ ​​
​​​​ ​ ​ ​ ​ ​ ​​
px
px

What is CSS underline?

CSS underline is a style applied to text to draw a line under the text. It is used to emphasize text and highlight important text in the content.

How to use CSS Underline Generator?

CSS Underline Generator is a simple tool to generate CSS code and Tailwind Class for underlining text. You can easily customize the underline style, color, thickness, and offset using the options provided in the tool.

Here are the feature of CSS Underline Generator:

Underline style

You can select underline style from the dropdown. There are 5 underline styles available: solid, dashed, dotted, double, and wavy.

Underline color

You can select underline color from the color picker. You can choose any color for the underline.

Underline thickness

You can select underline thickness from the range slider. You can choose the thickness of the underline.

Auto thickness is also available. You can select auto thickness to set the thickness of the underline automatically.

Thickness from font size option is also available. You can select this and the thickness of the underline will be the same as the font.

Underline offset

You can select underline offset from the range slider. You can choose the offset of the underline.

Offset means the distance between the text and the underline. You can set the offset of the underline in positive or negative values. Positive values will move the underline below the text and negative values will move the underline above the text.

Auto offset is also available. You can select auto offset to set the offset of the underline automatically.

About CSS Underline

The text-decoration property in CSS is used to underline text. This property allow us to underline text with different styles like solid, dashed, dotted, double, and wavy.

Underline is used to emphasize text. It is used to highlight important text in the content. It is also used to show links in the content.

In CSS, you can underline text using the text-decoration property. You can set the text-decoration property to underline to underline text.

Here is an example of underlining text using the text-decoration

<style>
  .underline {
    text-decoration-line: underline;
    text-decoration-color: blue;
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
  }
</style>
 

In the above example, we have used the text-decoration-line property to underline text. We have set the text-decoration-color to blue, text-decoration-style to solid, text-decoration-thickness to 2px, and text-underline-offset to 5px.

Conclusion

Getting underlines to look just right can be surprisingly tricky - especially when you want something more interesting than the basic browser default. This generator takes all the guesswork out of it by letting you play with different styles, colors, and spacing until everything clicks. The wavy and dotted options are pretty cool for creative projects, and being able to adjust the offset means you can finally get that perfect distance between your text and the line. What's really nice is how it handles both the old-school text-decoration approach and the newer individual properties, then gives you clean code for whatever setup you're working with. No more digging through CSS docs to remember which property controls what.