Text underline can be canceled through the text-decoration property in CSS: Set text-decoration to none to cancel all text decoration effects. Apply this style to specific elements that need to be underlined.
CSS Cancel Underline
How to cancel text underline in CSS?
In CSS, you can use the following attribute to cancel text underlining:
<code class="css">text-decoration: none;</code>
Description:
text- The decoration
attribute is used to set the decoration effect of text, including underline, strikethrough and overline. The none
value removes all text decorations, including underlining. Example:
To ununderline text within a paragraph element, use the following code:
<code class="css">p { text-decoration: none; }</code>
Note:
text-decoration
style applied, you may need to override it using the !important
rule: <code class="css">p { text-decoration: none !important; }</code>
The above is the detailed content of How to remove underline in css. For more information, please follow other related articles on the PHP Chinese website!