Home > Article > Web Front-end > How to remove underline from css hyperlink
In CSS, you can use the text-decoration attribute to remove the underline of a hyperlink. You only need to set the "text-decoration:none" style to the a tag. The text-decoration attribute specifies the decoration added to the text. When the value is none, it means no text decoration.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
We know that CSS is generally not initialized, and the text with hyperlinks in the web page will be underlined. If we want to remove the underline, how should we set it up? Next, divcss5 will introduce to you how to remove the underline style of html a hyperlink.
Let’s get to know the following CSS attribute words. If we want to remove the underline of a hyperlink anchor text, we will use the following CSS style words:
text-decoration setting Underline style word
To remove the underline style of a hyperlink, we can set the value of css text-decoration to "none".
Remove A link underline style code as follows:
a{text-decoration:none}
Next, we will introduce the case of removing superline through css Link underline style.
HTML code
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>document</title> </head> <body> 想要带你去浪漫的<a href="https://baike.baidu.com/item/%E5%9C%9F%E8%80%B3%E5%85%B6/198448?fr=aladdin">土耳其</a>! </body> </html>
Screenshot
Before removing the underline
Use css to remove the hyperlink underline
css code snippet
a{ text-decoration:none }
Recommended learning: css video tutorial
The above is the detailed content of How to remove underline from css hyperlink. For more information, please follow other related articles on the PHP Chinese website!