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

I do not remember how to do this.

Help please.

Hi Kerrie Brown ,

Whats the matter?

I do not get the curly lines part.

You mean this ?

{ }

3 Answers

Fábio Nascimento
Fábio Nascimento
10,418 Points

Is just the way you separate the rules for a given selector. For example, if you are applying styles to a paragraph tag:

p { rules go here }

I hope that helps.

Yes.

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hello Kerrie,

CSS styles are made up to 2 main parts,

You have a selector, which is a way of telling the browser which element it should select

e.g.

//to select a paragraph element
p {}

p ul {} //an unordered list inside a paragraph

ul.className // an unordered list with a particular class.  or # for an id

Inside the curly braces "{}" is where you tell the browser what it should do with that selector.

e.g.

p  {
   //Action to be taken
}

So these "actions" are made up of CSS properties in which values are assigned, usually by keywords of special units.

p  {
   background: red;
}


p {
  background: #000000;
}

You can learn more about this on Guil's CSS Foundations course. :-)