Lorem ipsum dolor sit amet, consectetur adipiscing elit...
border: 1px solid #000000;
In CSS, the text-decoration property is used to control the decoration of text within HTML elements. It allows you to add or remove text decorations, such as underlines, overlines, line-throughs, and blink effects. You can use this property to enhance the visual appearance of text for various purposes.
The text-decoration property can take one or more values to define multiple text decorations. Here are the common values:
none: No text decoration is applied (default).
.no-decoration {
text-decoration: none;
}
underline: Adds an underline to the text.
.underlined {
text-decoration: underline;
}
overline: Adds an overline above the text.
.overlined {
text-decoration: overline;
}
line-through: Adds a line through the text, typically to indicate that the text has been deleted or is no longer valid.
.line-through {
text-decoration: line-through;
}
blink: Adds a blinking effect to the text. Note that this value is often ignored by web browsers for usability reasons.
.blinking {
text-decoration: blink;
}
You can also apply multiple text decorations by specifying them as space-separated values in the text-decoration property. For example, to underline and overline text simultaneously:
.underline-overline {
text-decoration: underline overline;
}
The text-decoration property is frequently used to enhance the visual styling of links (anchor tags) by applying underlines or changing text colors when links are hovered over or visited. Additionally, it can be used for various other purposes where text decorations are needed for emphasis or aesthetic reasons.
Select Language
Set theme
© 2024 ReadyTools. All rights reserved.