HTML and CSS Reference
In-Depth Information
For example, in decimal RGB convention, the color white is rgb(255, 255,
255) or rgb(100%, 100%, 100%) , and a medium yellow is rgb(127, 127, 0)
or rgb(50%, 50%, 0%) .
8.4.1.6. Angle, time, and frequency property values
A few properties require a value that expresses an angle, such as the
heading of a compass. These properties take a numeric value followed
by the units deg (degrees), grad (gradations), or rad (radians). Similarly,
express time values as numbers followed by either ms (milliseconds) or
s (seconds) units.
Finally, frequency values are numbers followed by Hz (hertz) or kHz (1
kilohertz = 1000 Hz). Interestingly, there is no corresponding MHz or GHz
units, because frequencies in CSS2 refer to audio, not TV, FM radio,
Bluetooth wireless networking, or other electromagnetic waves.
8.4.2. Property Inheritance
In lieu of a specific rule for a particular element, properties and their
values for tags within tags are inherited from the parent tag. Thus, set-
ting a property for the <body> tag effectively applies that property to
every tag in the body of your document, except for those that specific-
ally override it. So, to make all the text in your document blue, you need
only write:
body {color: blue}
instead of creating a rule for every tag you use in your document.
This inheritance extends to any level. If you later created a <div> tag
with text styled by a different color, the styles-conscious browser would
display all the text contents of that <div> tag and all its enclosed tags in
 
Search WWH ::




Custom Search