Example of how to remove underline from hyperlink in html

黄舟
Release: 2017-07-22 14:00:55
Original
2420 people have browsed it

We can use CSS syntax to control the form and color changes of hyperlinks.

Next we make a link like this: when the link is not clicked, the hyperlink text is not underlined and appears in blue; when the mouse is on the link, it is underlined and the link text appears in red; when the link is clicked, the link No underline, displayed in green.

The implementation method is very simple. Add the following CSS syntax control between and in the source code:

 <style type="text/css">
   <!--
   a:link { text-decoration: none;color: blue}
   a:active { text-decoration:blink}
   a:hover { text-decoration:underline;color: red} 
   a:visited { text-decoration: none;color: green}
   --> 
   </style>
Copy after login

Among them:
a:link refers to Normal links that have not been visited;
a:active refers to the link being clicked;
a:hover refers to the mouse on the link;
a:visited refers to the link that has been visited;
text -decoration means text modification effect;
The none parameter indicates that the hyperlink text does not display underline;
The underline parameter indicates that the hyperlink text has underline

Similarly, if none is replaced with overline, it will be Add an underline to the hyperlink text, switch to line-through to add a strikethrough to the hyperlink text, and blink to make the text blink.

The above is the detailed content of Example of how to remove underline from hyperlink in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template