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.
Leave a comment