The specified value of a CSS property is the value which was explicitly set for the property, either from the style sheet directly or, if not present in the style for the current element, from the parent element if possible. The selected value is determined in one of three ways.
- If the document's style sheet has specified a value for the property then it will be used. For example; if the
color
property is set togreen
then the text color of the corresponding element will be green. - If the document's style sheet has not specified a value then it will be inherited from the parent element (if possible). For example; if we have a paragraph (
<p>
) inside a<div>
and the<div>
has a CSSfont
property value of "Arial" and the<p>
doesn't have afont
property defined then it will inherit the Arial font. - If none of the above are available, the initial value for the element as specified by the CSS specification is applied.
Specifications
Specification | Status | Comment |
---|---|---|
CSS Level 2 (Revision 1) The definition of 'cascaded value' in that specification. | Recommendation | Initial definition. |
See also
- CSS Reference
- CSS Key Concepts: CSS syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values. Definitions of value syntax, shorthand properties and replaced elements.