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 Introduction to HTML and CSS (2016) Adding a New Web Page Write the CSS

shea webb
shea webb
2,937 Points

Image doesn't change after I add in border and border-radius in css

Here is my code for changing the image. I have saved it, refreshed the page and cleared the cache. So something must be wrong with my code but I am completely missing it! Help please!

HTML: <head> <link rel="stylesheet" href="resume.css" class="main-image"> </head>

CSS: .main-image { border: solid 4px black; border-radius: 50%; }

shea webb
shea webb
2,937 Points

Oh my goodness, I of course I notice the stupid error now that I posted this question! HTML in the wrong place haha

Michael Cockrell
Michael Cockrell
Courses Plus Student 542 Points

believe me, there is nothing to be ashamed about when you put stuff in the wrong place or scratch your head for hours because you cant figure out where the mistake in your code is, only to have someone point out that you accidentally misspelled something. it happens way more often than you think and with people who are new to programming its the cause of over 90% of the errors that ive seen. so anytime your code doesnt work always check these things?

did you save it first? are you sure everything is spelled correctly (case matters on some things, doesnt matter on others so its good practice to try and match case whenever possible)? do you have semicolons where you need them? do you have unnecessary semicolons? are all of your brackets, braces, parenthesis, and tags closed?

stick with it and it will become second nature but its always weird and unnatural in the beginning.

2 Answers

You are adding the class to the link tag instead of the img tag

<link rel="stylesheet" href="resume.css" class="main-image"> </head>

it should be:

<img src="" class="main-image" >


The <link> tag defines a link between a document and an external resource / The <link> tag is used to link to external style sheets. In this case, between .html and resume.css, and it is not possible to use the attribute "class" inside the tag link

I hope I have helped