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 Customizing Colors and Fonts Write Hexadecimal Colors

Austin Zeller
Austin Zeller
2,760 Points

how do I Set the color of anchor elements inside the nav element to white using a hexadecimal value?

?

4 Answers

Stipe Stipic
Stipe Stipic
17,520 Points

nav a{ color:#fff; }

The hexadecimal value is the #Code #FFF (White) #000 (Black)

You are selecting anchor elements h1 and h2

and changing the color: element

This code will pass :-)

h1 { color:#FFF; } h2 { color:#FFF; }

Maxwell DeMers
Maxwell DeMers
6,853 Points

The answers that are given will do the job for you. For some incremental advice, I'd add classes to your anchor elements. By doing so, you can style all of your links in your nav element the same with just one CSS rule. In this case, you can give your anchor elements the class "class = navLinks" and have them styled like this: .navLinks { color:#fff; }

nav a{ color:#fff; }