Computer Science, asked by TheWorker, 11 months ago

How can we set the color of text that as a link in web page? explain the help of suitable example?​

Answers

Answered by sivasujithkumar
0

Answer:

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 of a visited link. If a hyperlink is this color, the user can expect that clicking the link takes 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.

CSS link color example

In the CSS example below, we are setting the hyperlink colors to resemble what is shown on this page. First, all anchors are set to the #2c87f0 (shade of blue), #636 a shade of purple, and all hover and active links color:#c33 (red). The below code can be added to the CSS style element or in your .css file.

a {

 color: #2c87f0;

}

a:visited {

 color: #636;

}

a:hover, a:active, a:focus {

 color:#c33;

}

If your page is not using CSS or you don't want to convert to CSS, the steps below show how to do this in the BODY tag in the HTML code. However, as mentioned earlier, we highly recommend using the above CSS code instead of the body tag. You can add the above code into a CSS file and link all your web pages to that CSS file. Then, you could change the background-color values in that one CSS file to instantly change the background color of all pages linking to it.

HTML body tag example

In some very rare situations, it may not be possible to use CSS. For those situations, you can also define the background color, text color, link color, and other values in the HTML body tag as shown below.

<BODY TEXT="#092d07" LINK="#1FOOFF" VLINK= "#000000" ALINK="#000000" BGCOLOR="#ffffff">

Below are the descriptions of each of the HTML attributes in the body tag.

TEXT = The color of text.

LINK = The color of links.

VLINK = Visited link color.

ALINK = Color of the active link or the color the link changes to when clicked.

BGCOLOR = The page background color.

Explanation:

Answered by rekhasuresh090
0

Answer:

Links should clearly be identifiable as links to readers.

Refrain from implementing colored links that may impede user ability to distinguish links from regular text, or color links for purely aesthetic reasons. See the guides to editing articles for accessibility at contrast and navbox colors.

This help page is a how-to guide.

It details processes or procedures of some aspect(s) of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus and vetting.

Explanation:

Link style Type Color Color

blue link link to a Wikipedia page that currently exists #0645AD = rgb(6,69,173)

dark blue link link to a Wikipedia page that exists and that you have visited #0B0080 = rgb(11,0,128)

red link link to a page that does not currently exist within Wikipedia #BA0000 = rgb(186,0,0)

light brown link link to a Wikipedia page that does not exist, but that you have visited #A55858 = rgb(165,88,88)

brown link link to a very short article within Wikipedia, but only if the user has set a preference option to format "stub" links in this way #772233 = rgb(119,34,51)

light blue link 1

light blue link 2 link to a page at another wiki, usually another Wikimedia project or an external link

Note that the light blue color is used whether or not the page actually exists at the target wiki. For example, there is an article about George Washington Carver here on the English Wikipedia, while there is no article of the same name on the Japanese Wikipedia; but they do have an article about the same man under a different title. #3366BB =

Similar questions