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

CSS How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Aimee Rosato
Aimee Rosato
431 Points

Anchor elements

What are the anchor elements that the 'a {}' refers to? Is it only the underline on the original links, or does it refer to something else too?

3 Answers

Abe Layee
Abe Layee
8,378 Points

The anchor tag allows you to move from section of a site to another section. When you click on the contact link, it will take you to the contact section of the side.

<a href="index.html">Home</a>   // by clicking on this link, it will take you to the home page
<a href ="contact.html">Contact</a>    // same thing to the contact page
Abe Layee
Abe Layee
8,378 Points

I don't cleary understand your question but the default style for anchor is that they have an underline. Also, the default color is blue. If you want to change the color, you simply target it by using the universal selector. This simple example below will change all the color of any anchor on the site to white and display property to block which mean they take their own line.

a {
 color:#fff;
 display:block;
 }
Aimee Rosato
Aimee Rosato
431 Points

I guess I am trying to clarify what the anchor is exactly. What does it refer to?

Aimee Rosato
Aimee Rosato
431 Points

Okay, I think I understand now. I was getting confused as to why he used a, and then for the other code we had to use ids to name sections of the code (like #logo). Thanks Abraham!