Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Use the Navigation Element

The color of my hyperlink for h1,h2 and Portfolio is not blue but purple. Why is it so?

When I viewed my webpage after I refreshed it, I noticed that my hyperlinks are not colored blue, it is purple. So the h1 which says Web Pad, and the h2 which says Designer are purple. Only the About and the Contact hyperlinks are colored blue.

Here is my code.

<header> <a href="index.html"> <h1>Web Pad</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header>

2 Answers

Shay Paustovsky
Shay Paustovsky
969 Points

Hi Web-Pad,

If the hyperlinks are colored blue it means they haven't been visited yet. if they are colored purple it means they have been visited

Pseudo Classes for CSS

a:link - only works for links with a valid link in the href attribute a:visited - indicates link that haven't been visited yet.

Hope I've helped

Happy Coding

Shay

Thank you for the response. I did try to click Portfolio earlier. So it just means that it has detected that I have visited or clicked that tab? And so there is nothing wrong with the code?

Oh, I think I got it. We have not set the path to the About, and other sections too. I hope I understood it.

Thank you.