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 trialAaron Arkie
5,345 Points:target pseudo selector
Can someone explain this to me the target pseudo-class better? How does the comp know the target if i don't give it something to target? is it specified somewhere? Thanks in advance.
2 Answers
Frankie Guerra
3,739 PointsHey James,
URLs with an # followed by an anchor name, link to a certain element within a document. The element being linked to is the target element. The :target selector can be used to style the current active target element. http://www.w3schools.com/cssref/sel_target.asp So any URLs linked to an element in your page will be automatically targeted by " :target " without having to specify.
Aaron Arkie
5,345 PointsThank you! Really appreciate it.
James Ingmire
11,901 PointsJames Ingmire
11,901 PointsDon't understand your question i'm afraid.