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.

CSS How to Make a Website CSS: Cascading Style Sheets Style the Basic Elements

Remove underline

What am I doing wrong?

css/main.css
<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>