Pseudo-Classes & CSS Classes

Pseudo-classes can be combined with CSS classes. When you hover over the link in the example, it will change color:

HTML file: Displayed by browser:
<style>
/* mouse over link */
a.highlight:hover { color: #FF0000; }
</style>
<body>
<p><a class="highlight" href="intro2.html" target="_blank">CSS Syntax</a>: This link will change color when moused over.</p>
<p><a href="index.html" target="_blank">CSS Tutorial</a>: This link will not change color when moused over.</p>
</body>

CSS Syntax: This link will change color when moused over.

CSS Tutorial: This link will not change color when moused over.


Back button Table of Contents Next button