Most browsers show links in blue with an underline and change the color of links you have already visited, unless you tell them to do otherwise.

  • color : Changes the colors of the links
  • background - color : Highlights the link, as if it had been highlighted with a highlighter pen
  • text - decoration : Commonly used to control whether the link is underlined or not, although it can also specify that text should have a strikethrough, blink, or be overlined

While you can just create rules that apply to the <a> element to set properties such as color and text - decoration , there are also four pseudo- classes that can give greater control over presentation of links.

name Description
link Styles for links in general
visited Styles for links that have already been visited
hover Styles for when someone is hovering over a link
active Styles for links that are currently active (being clicked)

Using these pseudo - classes allows you to change properties of links when the user hovers over them (making them a slightly different color, maybe adding a highlight and underlining them), and also the properties of links that have been visited.

When used, these properties should be specified in the order listed in the table above.

	      	body {background-color:#ffffff;}
			a {
			font-family: arial, verdana, sans-serif;
			a:link {
			a:visited {
			a:link:hover {
			a:active {