CSS text decoration
Created By: chatGPT
In CSS, the
text-decoration
property is used to specify the decoration of text. This includes underlining, overlining, line-throughs, or none of them. The property can accept a variety of values for different effects.p {
text-decoration: underline;
}
You can also combine multiple text decorations together. For example, if you want both an underline and a line-through, you can specify this with the
text-decoration
property.p {
text-decoration: line-through underline;
}
Additionally, you can specify the color and style of the text decoration using the
text-decoration-color
and text-decoration-style
properties. This allows for more visual customization.p {
text-decoration: underline;
text-decoration-color: red;
text-decoration-style: dashed;
}
To remove any text decoration, you simply set the property to
none
.p {
text-decoration: none;
}