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