Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

CSS Selectors

To style our HTML elements, we must somehow tell the browser what we want to style. In order to do this, CSS provides a way for us to select one or more elements on the page.

Here are some examples:
#apple {
    color: red
}

.boldtext {
    font-weight: bold
    font-family: Arial;
    font-size: 1em;
}

input {
    width: 150px;
}

On the next page we'll examine one of the most common types of selectors -- the ID selector.

Was this helpful?

Comments

Byanonymous Anonymous 0 User 0
What are the differences between the three types of selectors shown?  Are you going to explain these later?
Byanonymous Anonymous 0 User 0
Thanks for pointing this out, I should have indicated that these are explained in the subsequent tutorial pages (e.g. How to Style a Single Element with CSS) seen after following the Next link above.

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License