The CSS style declaration statement to cancel the underline of a hyperlink is "text-decoration:none;"; where "text-decoration" is an attribute, which can specify the decoration added to the text, and "none" is the attribute value, Used to specify that no text modification will be added, and the original underline style of the hyperlink will be removed.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Style is the smallest syntax unit of CSS. Each style contains two parts: selector and declaration (rule), as shown in the figure below.
If you want to remove the underline of a hyperlink in CSS, you need to use the text-decoration attribute. Just set its attribute value to "none".
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> a{ text-decoration: none; } </style> </head> <body> <a href="https://www.php.cn/">PHP中文网</a> </body> </html>
Analysis: In the above style, the
selector is a
, is an element selector
The style declaration statement is: text-decoration: none;
, which specifies that the text must be unmodified.
The text-decoration attribute specifies the decorations added to the text.
none Default. Text that defines the standard.
(Learning video sharing: css video tutorial)
The above is the detailed content of What is the CSS style declaration statement to cancel the underline of a hyperlink?. For more information, please follow other related articles on the PHP Chinese website!