Home >Web Front-end >Front-end Q&A >How to remove underline in css a

How to remove underline in css a

藏色散人
藏色散人Original
2021-06-08 11:40:531929browse

css a method to remove underline: first create an HTML sample file; then create a link through the a tag; finally, set "a{text-decoration:none}" to remove the underline.

How to remove underline in css a

The operating environment of this article: windows7 system, css3 version, DELL G3 computer

css aHow to remove the underline?

css Remove the A underline style - CSS cancels the default underline effect of hyperlinks

a To cancel the underline effect, use the text-decoration style in CSS to cancel it.

css a cancel underline code:

a{text-decoration:none}

This will remove the underline style of the a tag hyperlink in the web page by default.

Instance of canceling the underline a in the specified object

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>取消去掉a标签下划线</title>
<style>
.exp a{ text-decoration:none}
</style>
</head>
<body>
DIV CSS学习上<a href="//www.xxx.cn/">CSS</a>!
<div class="exp">
欢迎访问<a href="//www.xxx.cn/">CSS</a>!
</div>
</body>
</html>

Recommended learning: "css video tutorial"

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