Home > Web Front-end > CSS Tutorial > How to remove underline style in css

How to remove underline style in css

王林
Release: 2023-01-06 11:13:02
Original
3777 people have browsed it

The way to remove the underline style in css is to set the attribute [text-decoration: none;]. If we want to add a style to the text, such as a red wavy line, we can set the attribute [text-decoration: underline red;].

How to remove underline style in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

If we want to cancel the underline style in the text, we can set the attribute text-decoration: none. Let’s introduce the text-decoration attribute below.

The text-decoration attribute specifies the decorations added to the text, such as underline, overline, strikethrough, etc.

text-decoration: none;                     
/*没有文本装饰*/
text-decoration: underline red;            
/*红色下划线*/
text-decoration: underline wavy red;       
/*红色波浪形下划线*/
Copy after login

Give some examples:

h1.under {
    text-decoration: underline;
}
h1.over {
    text-decoration: overline;
}
p.line {
    text-decoration: line-through;
}
p.blink {
    text-decoration: blink;
}
a.none {
    text-decoration: none;
}
p.underover {
    text-decoration: underline overline;
}
Copy after login

Learning video sharing: css video tutorial

The above is the detailed content of How to remove underline style in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template