Home  >  Article  >  Web Front-end  >  How to remove the underline of a tag in html

How to remove the underline of a tag in html

藏色散人
藏色散人Original
2021-04-29 09:54:4923714browse

html Method to remove the underline of the a tag: 1. Set the default state of the a tag to remove the underline through "a{text-decoration: none;}"; 2. Use "a:visited{text-decoration: none;}" ;}" Remove the underline after the a tag is accessed, etc.

How to remove the underline of a tag in html

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

HTML a tag removes underlining

a{text-decoration: none;}    //这个是设置a标签的默认状态去除下划线
a:visited{text-decoration: none;}    //这个是设置a标签的访问过后的状态去除下划线
a:hover {text-decoration: none;}    //这个是设置a标签的鼠标覆盖状态去除下划线
a:active{text-decoration:none;}    //这个是设置a标签的活跃状态去除下划线

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.

How to remove the underline of a tag in html

For more detailed HTML/CSS knowledge, please visit the CSS Video Tutorial column!

The above is the detailed content of How to remove the underline of a tag in html. 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