Computer Science, asked by traptigupta3371, 11 months ago

How to set the color of text that act as a link in a web page?

Answers

Answered by tallatali321
1

Below are the steps on how you can change the color of the links shown on your web page using HTML and CSS. Although the link colors can be done with the HTML BODY tag, we always recommend doing any styling settings in CSS as shown below.

Tip: When defining the color of any web page element, you may need to use HTML color codes. For major colors, you can also specify the names of those colors instead of using the color codes, for example, red, blue, green, and black instead of using their respected color code values.

Understanding the different types of hyperlinks

Hyperlinks are special elements on your page, because they are interactive. To indicate that they are interactive, they are colored differently depending on their state. A hyperlink has three special colors, in addition to its original color, which represent three different states:

Visited link - The color once a link has been visited. If a hyperlink is this color, the user can expect that clicking the link will take them to a page they've already seen.

Hover link - The color when the mouse is hovering over a link. If a hyperlink is this color, the user can expect that pressing the left mouse button (clicking), then releasing the button, will cause the link to be visited. Hover color is the same for both Active and Visited links.

Active Link - The color of the link when being clicked. When the user sees this color, they can expect that releasing the mouse button will cause the browser to visit the link.

Tip: See our hyperlink definition for further information and related questions to hyperlinks.


Similar questions