Home  >  Article  >  Web Front-end  >  How to change the font color of html hyperlink

How to change the font color of html hyperlink

藏色散人
藏色散人Original
2021-04-28 14:56:1217292browse

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!

Statement:
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