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 Beginning HTML and CSS Write a CSS Selector and Property

What does it mean to "select" in this task #2?

I'm sure it is very simple, but if I don't know how to answer something, do I have to email you every time or is there a little hint place that I am missing?

2 Answers

In html you have elements, in css you have selectors and properties. So when it asks you to select the h1 you use the type selector For example:

   h1 {
    color: red;
}

The h1 {} is the type selector the color is a property. So that declaration tells the browser to select all h1 tags and give them the color red.

There are lots of css selectors some specific some general. The type selector is one of the more general ones. Here's a great selector "cheatsheet" link

Hi Carman,

I revised my task #1 and all looked good, but then task #2 asks this:

Challenge task 2 of 3 Now, write CSS that will select the h1. Don’t forget your curly braces!

Although, my #1 task is correct, the video never went on to tell how to do anything further than this:

<body> <style> h1 { color: blue; }

</style> <h1>Sheryl Engelhardt</h1>

I don't get it... how do I go onto select the h1. I understand what you said before about h1 {} is the element selector, color is the property and blue is the value, but how do I now go onto select h1 with more {}....?

Also, should I be using the '''html markdown when I write code in these fields?

Last question.... why can't I paste a screen shot of my worksheet into this field with ctrl v?

Thank you for helping me with these super newby questions : ) Sheryl

The style tags are for putting your css in. So just put the selector in those.

Perfect, got it now. I made the mistake in the first task of putting the { } outside of the property, nestled inside <style> instead of h1 { }.

Ok so the style tags in task 1, are for putting css in they server the same purpose as a css file. So you have to put your selector in the style tags. It should look like this:

<style>
h1 {Your code in here}
</style>