How To Highlight A Link With Color

Table of contents:

How To Highlight A Link With Color
How To Highlight A Link With Color

Video: How To Highlight A Link With Color

Video: How To Highlight A Link With Color
Video: How to HIGHLIGHT TEXT on a Web Page 2024, December
Anonim

The HTML markup language has a large number of options for displaying elements in the browser window. To edit graphic parameters, set color to page elements, CSS is often used, which allows you to fine-tune the desired text color.

How to highlight a link with color
How to highlight a link with color

Instructions

Step 1

To edit the link display parameter, you need to change the page code. Open your HTML document with a code editing utility. Use the standard Windows editor "Notepad". You can also install additional programs such as Notepad ++ or HTML-Viewer that will allow you to view the code you need with syntax highlighting. To open the file in the editor, right-click and select "Open with". In the list that appears, specify the utility you have selected.

Step 2

In the editor window, navigate to the link whose color you want to change. Each link has the form Link Name. To change the color of the text, use the style parameter.

Step 3

After selecting the line you need to change, go to the page block. After the closing descriptor, enter the tag and create the desired CSS pseudo-class. For example:

.colorchange {color: red;

background: blue;

padding: 1px; }

Step 4

This code creates a pseudo-class named colorchange that can be used in link attributes. The color parameter is responsible for the color of the element's text - in this case, the value red is set, which will create the text in red. You can add any HTML value to this item. The background color of the link is set via the background parameter. The padding parameter is responsible for the indentation of the link relative to other elements.

Step 5

After creating a pseudo-class, you need to set it in the body of the document itself. Go back to the section of the code where your link is located. Edit it by entering the class parameter and giving it a value with the name of the CSS pseudo-class. For example:

Link name

Step 6

You will create a red link with a blue background and 1-pixel padding as specified in the CSS above. Save the changes made to the file and close the editor window. To check the specified code, open your page in a browser window to make sure that the settings made are correct. The highlighting of the link with color is completed.

Recommended: