How to change color of links on the website

How to change color of links on the website

In the course of work on the website both professional webmasters, and people who are engaged in update of the website, but are not professionals, different changes are made to style design of a web resource. For example, it can be necessary for any reasons to change color of links on the website. In this case it is necessary to know that color of links changes by means of CSS (Cascading Style Sheets) – cascading style sheets. These are the tables used together with a programming language for creation of a web resource. CSS are responsible for structure of the website, that is for its style, appearance, and html - for the maintenance of a resource. CSS are continuation of development of HTML. Color of links on the website So, it is possible to change color of links both for the website in general, and for each link separately. Colors of links are set as an attribute of the main tag. An attribute is that it is optional to state in the code as some of them are already set by default. The link attribute defines color of links on the page of the website. Blue color is by default set. Alink – the attribute defining color of active links, by default – red. Vlink – the visited links, acts their standard color violet. Most often color of links on web pages is set in a hexadecimal number system (#EEEEEE – gray color) or in the rgb format (#808080 – gray color), however it is possible to use also traditional English designations of flowers (gray – gray color). Besides, it is possible to set color and in degrees, the HSL format for this purpose will approach. Color lookup tables cannot be found on the Internet. We change color of links To change color of all links on the page, there is enough in styles at the color attribute to change color. For this purpose find the style.css file, open it and find attribute a. For example, A {color: green;/* Color of links */}, where And – the link which color we change for green. You can change color value at discretion, using any of the systems of designation of color. The browser "will understand" you. The style will be applied to all links of the web page. You can change in the same way colors at other attributes, for example color of the link at guidance of the mouse cursor on it. That on the web page to make links of different flowers, use the following entry in the file with styles: .menu a {color: gray; } .content a {color: green; } Follows from an example that references for the menu will be had gray color, and links in the block content - green. The same actions can be done with links if styles are not in the separate file, and in the document HTML. These are contextual selectors. If you want to edit quickly styles and to change colors of links, then it is better to use the visual editor of Dreamwever. The main thing, you remember: links should look organically concerning all web page. Links dark and vice versa are suitable for a light background better.

Author: «MirrorInfo» Dream Team


Print