HTML and CSS Reference
This bit of CSS is the basis of most pop-up and drop-down menus on
the web. The only requirement is that the element to be shown is a
descendant of the element that will be hovered over. It lets you present
extra information only when the user indicates they're interested in it
by putting the mouse pointer in that location.
Note that the hover pseudo — class assumes users are accessing
the page with a desktop browser and using a mouse. For many
potential users, this isn't true, including people with
disabilities and users of mobile or tablet devices.
You should now have a good grasp of the basic syntax involved in CSS
and how to write selectors to pick out the required elements for styling.
All that's left to learn is the properties and values needed to create
Properties and values
The interesting parts of CSS are the properties and values that cause
the visible effects seen on the web page. The sheer variety of properties
and values is such that entire topics have been written about them.
This section covers the most common values used in styling web pages.
Colors and lengths
The most common values in CSS are colors and lengths. A number of
different properties accept either colors or lengths, or both, as values.
This section gives a brief overview of them; then, in the following sec-
tion, you'll learn about properties where they can be used.
The previous sections have included several examples of color values.
Mostly the examples have used color keywords such as black and red ,
because it's obvious what these mean even to people who don't know
CSS , but there are several other ways to describe colors in CSS . These
approaches are more flexible because they provide separate values for
the amount of red, green, and blue that makes up the color. The follow-
ing table shows the same colors expressed four different ways.