HomeWeb utilitiesHTMLHTML Link Color
HTML reference

HTML Link Color

How to change HTML link color.

How to change HTML link color.

Link text color

Changing link color is done with css styling:

Main page

The code will generate this link:

Main page

Link background color

Changing link background color is done with css styling:

Main page

The code will generate this link:

Main page

Div links color

CSS code:

								<style>
#link_bar a { padding:15px; font-weight:bold; float:left; }
#link_bar a:link { color:#d0d0d0; background-color:#0000a0; }
#link_bar a:visited { color:#c0c0c0; background-color:#0000a0;
								}
#link_bar a:hover { color:#ffffff; background-color:#000060; }
#link_bar a:active { color:#f0f0f0; background-color:#00ff00; }

HTML code:

								<div id="link_bar">
<a href="html-anchor-link.htm">Anchor link</a>
<a href="html-link-color.htm">Link color</a>
<a
								href="../mailto.htm">Email link</a>
<a href="html-image-link.htm">Image link</a>
<a href="html-text-link.htm">Text link</a>

View:

								[Anchor link](/web/html/html-anchor-link)
								[Link color](/web/html/html-link-color)
								[Email link](../mailto.htm)
								[Image link](/web/html/html-image-link)
								[Text link](/web/html/html-text-link)