Styling Links with CSS
Links can be styled with any CSS property, such as color, bgcolor, text-decoration and so on, like so.
a {color: #0F0;}
Links can also be styled depending on what state they’re in.
a:link {color: #0F0; text-decoration: none;} /* a standard link turned green and not underlined. */
a:visited {color: #090; text-decoration: none;} - /* a visited link tuned dark green and not underlined. */
a:hover {color: #6CF; text-decoration: underline;} - /* a moused over link turned light blue underlined. */
a:active {color: #0C0; text-decoration: none;} - /* a selected link turned turned dark green and not underlined. */
States must always appear in the order link, visited, hover and active.
Leave a Reply