How to change the font color of html hyperlink

藏色散人
Release: 2023-01-05 16:12:26
Original
17315 people have browsed it

How to modify the font color of the html hyperlink: first create a new html file; then give the text of the a tag 40px, and set the text thickness; then set the color of the link pseudo-element of the a tag and set the underline; Finally, set the clicked pseudo element acted to another color.

How to change the font color of html hyperlink

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Setting the color and the color after clicking can only be achieved by using the link and active pseudo-classes of the label.

The specific method is to first create a new html file, write two a tags here, one for demonstration:

How to change the font color of html hyperlink

Then set the style, here is The text size of the a tag is 40px, and the text thickness is set.

Then set the color of the link pseudo-element of the a tag and set the underline, set the clicked pseudo-element acted to another color, and cancel the underline. After the above settings are completed, let's take a look at the effect:

How to change the font color of html hyperlink

Open the browser and click the link of the demo group. The color turns blue, but the control group remains unchanged.

The above is how to set the font color of hyperlinks and the font color after clicking:

How to change the font color of html hyperlink

For more detailed HTML/css knowledge, please visit HTML video tutorial column!

The above is the detailed content of How to change the font color of html hyperlink. 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