Home  >  Article  >  Web Front-end  >  How to remove underline in css

How to remove underline in css

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-04-15 18:45:5917594browse

In css, you can use the "text-decoration" attribute to cancel the underline. You only need to set the "text-decoration:none" style to the element. The text-decoration attribute is used to add decoration to the text. When the value is "none", you can define unmodified standard text.

How to remove underline in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Canceling underline in css can be achieved using the text-decoration:none style.

Example:

 
 
 
 
取消下划线 
 

欢迎来到我的世界!

The effect is as follows:

How to remove underline in css

The text-decoration attribute specifies the decoration added to the text.

Note: The modified color is set by the "color" attribute.

This attribute allows setting certain effects on text, such as underlining. If the descendant element does not have its own decorations, the decorations set on the ancestor element will "extend" to the descendant elements. User agents are not required to support blink.

Attribute value:

  • none Default. Text that defines the standard.

  • underline Defines a line under the text.

  • overline Defines a line on the text.

  • line-through defines a line that passes under the text.

  • blink Defines blinking text.

  • inherit specifies that the value of the text-decoration attribute should be inherited from the parent element.

Recommended learning: css video tutorial

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!

Statement:
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