HTML CSS examples for CSS:Quiz
Set the background color for visited and unvisited links to "pink", and the background color for the hover and active link states to "yellow".
<!DOCTYPE html> <html> <head> <style> /* unvisited link */ a:link { background-color: pink; } /* visited link */ a:visited {<!-- ww w .j a v a 2 s .c o m--> background-color: pink; } /* mouse over link */ a:hover { background-color: yellow; } /* selected link */ a:active { background-color: yellow; } </style> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> <p><a href="http://java2s.com">java2s.com</a></p> </body> </html>