CSS Selector

Posted on May 3, 2011

0


CSS selectors are the heart and soul of CSS. They define which HTML elements you are going to be manipulating with CSS code and you should have a solid understanding of them when you are finished with this tutorial. Luckily for you, they are pretty simple to comprehend!

CSS Selector: Where It Fits In

In a typical CSS statement you have the following:

SELECTOR { PROPERTY: VALUE }

“Property” is the CSS element you wish to manipulate and “VALUE” represents the value of the specified property.
CSS Selector Name

The selector name creates a direct relationship with the HTML tag you want to edit. If you wanted to change the way a paragraph tag behaved, the CSS code would look like:

p { PROPERTY: VALUE }

The above example is a template that you can use whenever you are manipulating the paragraph HTML element. In the next lessons, we will not only teach where to place your CSS, but why and where you should use CSS as well.

Advertisements
Posted in: CSS