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!

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

Remove underline

What am I doing wrong?

<a href="http://www.google.com/" style="text-decoration:none">Google</a>

2 Answers

This isn't CSS, it's inline HTML, so it should be in your HTML file, not your stylesheet. Using it inline it should be:

<a href="http://www.google.com" style="text-decoration: none;">Google</a>

In your stylesheet it should look like:

a { text-decoration: none; }

I am trying to do this module.

Remove the underlines from all the links on the page.

It is blank, so will my example not work?

Can you post your full index.html and your full main.css? Please make sure to use the forum markup so that your code shows correctly. You can click "Markdown Cheatsheet" below the "Add A Comment" box for help.

Andrew Moore
Andrew Moore
21,076 Points

Hi Javid,

I think the problem is you've missed a semicolon at the end of your style attribute.

<a href="http://www.google.com/" style="text-decoration:none;">Google</a>