Methods to remove underlines in CSS are: text-decoration: none; text-decoration: underline none; outline: none; tags with text-decoration: none; using a text editor.
Removing underline in CSS
To remove underline in CSS, there are several methods:
1. Use text-decoration: none;
This is the most direct method, which can remove all decorative lines from the text, including underlines .
a { text-decoration: none; }
2. Usetext-decoration: underline none;
If you only want to remove the underline of the text while retaining other decorative lines ( Such as strikethrough), you can use this method.
a { text-decoration: underline none; }
3. Use the outline: none;
##outline attribute to control the outline style of the element, including outline lines . Set this to
none to remove both the outline and underline of the element.
a { outline: none; }
4. Use the tag
5. Use a text editor The above is the detailed content of How to cancel underline in css. For more information, please follow other related articles on the PHP Chinese website! tag to mark text for inserted content. By default, the
tag adds an underline, but this style can be overridden.
ins {
text-decoration: none;
}