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 CSS Basics (2014) Basic Selectors ID Selectors

I need help understanding what mistake I've made here to cause both my class selector and id selector to not work.

I wrote these examples in my html file and css file for the practice task at the end of "css selectors" but neither work. (The html and css parts of these examples were written in html and css files originaly).

<span class="trademark" >&copy;2017 Bookworm Blog</span>
.trademark {
  font-size: 1px;
  color: red;
}
 <img Id="header-image" src="logo.png" alt="Bookworm">
#header-image {
  width: 190px;
}
devina christabela
devina christabela
12,526 Points

And as Sean T. Unwin answered is correct I didn't notice the attribute id with capital Id

Sean T. Unwin
Sean T. Unwin
28,690 Points

I have edited your post for formatting.

I noticed that you have capitalized the id attribute in <img>. HTML Element attributes should always be lower-case.

1 Answer

Dimitar Dimitrov
Dimitar Dimitrov
11,800 Points

If you are using your own files did u linked your HTML file and your CSS file together in the <head> of your HTML file?