Home >Web Front-end >Front-end Q&A >How to remove underline in css a
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.
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!