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 Style the Basic Elements

Removing the underlines from all links. (CSS)

{ text-decoration: none; } hmm i might need {a?

2 Answers

Like so:

a {
  text-decoration: none;
}

Just a note.

Mikis is correct but that will remove the underline from every "a" tag on your site.

Remember specificity in css to target just your nav links, side-bar links, etc...

to remove from say just your navigation (assuming you used a nav tag) but leave it everywhere else...

nav a {
   text-decoration: none;
}

or to remove remove from a specific class (like a div with a class of "mylinks")

.mylinks a {
    text-decoration: none;
}

hope that helps!

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Chloe,

Yep, you need an a

a {
text-decoration: none;
}