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>
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!