From Web Education Community Group
< CSS‎ | Training
Revision as of 11:08, 20 November 2011 by Rworth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Some values are inherited by the children of an element in the document tree:



The 'font-size' property for the h1 element will have the computed value '13pt' (130% times 10pt, the parent's value). Since the computed value of 'font-size' is inherited, the em element will have the computed value '13pt' as well.


 body { font-size: 10pt }
 h1 { font-size: 130% }


  <h1>A <em>large</em> heading</h1>

See also 6.2 Inheritance.

In the next chapter, you will learn the priority level of selectors.