A Property’s Value

Each CSS property has different rules about what values it can accept. Some properties accept only one of a list of predefined values. Others accept numbers, integers, relative values, percentages, URLs, or colors. Some can accept more than one type of value. The acceptable values for each property are listed in the section describing that property (mostly in Chapters 10 and 11), but you’ll learn the basic systems here.


You can use the inherit value for any property when you want to explicitly specify that the value for that property be the same as that of the element’s parent.

Predefined values

Most CSS properties have a few predefined values that can be used. For example, the float property can be set to left, right ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.