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 Add Image Gallery Content

Purple Hyperlinks?

My hyperlinks are purple instead of blue in the beginner HTML course, I checked my code and started over again yet my hyperlinks are still purple instead of blue

2 Answers

Purple is the default color used by web browsers to identify visited (ie opened) links. You can see that happening right at the end of the video, when Nick clicks on one of the captions to open the image. When he goes back to the main page, that link is now purple.

You probably opened those links while working on the lesson.

If you really want to reset them to the default blue color, you could clear your browser history, but having purple links shouldn't interfere with completing the lesson.

Thank you so much!

Brendon Soto
Brendon Soto
6,332 Points

Hi Alex. Hyperlinks have different states associated with them and take on different properties during those states. You can address these states through targeting the specific state in CSS. The default property for visited links is purple, as Feliphe pointed out. You can change this by adding: a: visited { color: #whatever; }

If you want to learn more I'd recommend checking here: http://www.htmldog.com/guides/css/intermediate/pseudoclasses/

thank you Brendon