Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.