css hyperlink style code example

Example 1: remove style from link

a, a:hover, a:focus, a:active {
     text-decoration: none;
     color: inherit;
 }

Example 2: text underline hover css

a:hover {
  text-decoration: underline;
}

Example 3: css a link style

a:link { /* unvisited link */ color: #000; text-decoration: none; border: none; }
a:visited { /* visited link */ color: #000; }
a:hover { /* mouse over link */ color: #000; border: none; }
a:active { /* active link */ color: #000; }

Example 4: how to change hyperlink color in css

a {
  background-color: red;
  color: white;
  padding: 1em 1.5em;
  text-decoration: none;
  text-transform: uppercase;
}

Tags:

Misc Example