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 trialCarole Anne
Courses Plus Student 562 PointsPseudoclass question - nav a:visited
How does the browser know that writing "nav a: visited" means that every visited link should remain white in this example? Does "visited" mean anything in HTML language or could I have written something else?
Thank you
3 Answers
Dustin Matlock
33,856 PointsHi Carole, a web browser uses something called Web cache to verify if links have been visited before. CSS styles the links based upon your code. There's actually no space in a:visited
.
A CSS pseudo-class is a keyword added to selectors that specifies a special state of the element to be selected. For example :hover will apply a style when the user hovers over the element specified by the selector. βMozilla Developer Network
Carole Anne
Courses Plus Student 562 PointsThanks. The Mozilla definition really helped! This link was also helpful: http://www.sitepoint.com/web-foundations/pseudo-classes/. (I tried to create an anchor element but it didn't work? :) ) I've always wondered what a web cache was so I'll dive deeper into it too.
Michael Vidal
432 PointsFunny, I made the same space mistake. Thanks Dustin Matlock