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 Customizing Colors and Fonts Use Classes in CSS

Is the element nav a.selected { color: 32673f;} functions the same as the behavioral pseudo class named active?

Hi, I just encountered hover, active, and visited pseudo class types in a tutorial. Does the element "nav a.selected" that Nick has in the video, be considered as the equivalent if I use the pseudo class type "active"?

Aiden Berzins
Aiden Berzins
23,837 Points

They usually act very similar especially when it comes to links or a tags. However they are slightly different. The best example I can think of is the links at the top of the treehouse page when on is selected the link should immediately load having no time to show you the selected state however if you are on a certain page the page will show its active state as a slightly brighter font color.

Unlike for instance radio buttons that you will see when they are selected.

Antti Lylander
Antti Lylander
9,674 Points

Try moving on the page by hitting tab a few times and you see what 'active' means.

1 Answer

Thank you for the responses. It's clear to me now.