CSS: Inheritance |
| Each element inherit the property of parent element. Let's see: h1 {color : blue} That's, you are saying to the browser (called parser or U.A., User Agent) that all <h1> elements will be rendered blue. Well, if you say now: <h1>This is a line<em>very<em>cool</h1> What's happen? If you have not defined the color of <em> tag, it will inherit the color of the parent element (<h1>). So it will be rendered blue. Look at this example: <html> Well <h1> is a tag and. <p> is its parent However, some properties are not inherited from the parent element. It's ok. For example, borders properties aren't inherited. |
Index Home Back About Contact us!
Copyright (c) 1998-2006 Wowarea