Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set hyperlink font color by html

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to set html hyperlink font color, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

In html, you can set the hyperlink font color by adding the color attribute style to the hyperlink label "". The function of the color attribute is to set the color of the element font text; the syntax "hyperlink text".

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

Html sets the hyperlink font color

In html, you can set the hyperlink font color by adding a color attribute style to the hyperlink label ""

Example:

Default font color

The font color is pink.

The font color is black.

Effect picture:

Description:

The color attribute specifies the color of the text.

This property sets the foreground color of an element (in the HTML representation, the color of the element's text); the raster image is not affected by color. This color is also applied to all borders of the element unless overridden by border-color or some other border color attribute.

Syntax: color: color valu

Color values can be written in many ways, such as the name of the color, hexadecimal, RGB, RGBA, HSL, HSLA, and so on.

Value describes the name of the color, such as red, blue, brown, lightseagreen, etc., insensitive to case. The hexadecimal symbols # RRGGBB and # RGB (for example, # ff0000). "#" is followed by 6 or 3 hexadecimal characters (0-9, Amurf). RGB, red-green-blue (red-green-blue (RGB)) specifies that the color value is the color of the rgb code, and the function format is rgb (R _ Magi G _ (B)). The value can be an integer or a percentage of 0-255. RGBA, Red-Green-Blue-Alpha (RGBa) RGBa extends the RGB color model, which includes alpha channels that allow you to set the transparency of a color. A means transparency: 0 = transparent; 1 = opaque. HSL, hue-saturation-luminance (Hue-saturation-lightness) hue (Hue) represents the angle of the color ring (that is, a ring that represents a rainbow).

Saturation and lightness are expressed as percentages.

100% is full saturation, while 0% is a grayscale.

100% lightness is white, 0% lightness is black, and 50% lightness is "average".

HSLA, Hue-saturation-Luminance-HSLa (HSLa) HSLa extends from the HSL color model and includes alpha channels that specify the transparency of a color. A means transparency: 0 = transparent; 1 = opaque. The above is all the content of the article "how to set the hyperlink font color in html". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report