x
<html>
<head>
<title>CSS tutorial</title>
<style type="text/css">
body {
font-size:12pt; font-family:Georgia serif;
color:#455;
}
div {
font-size:1.3em;
}
p {
color:blue;
}
p+p {
color:inherit;
}
</style>
</head>
<body>
<div>
The <i>font-size</i> and <i>font-family</i> properties are inherited from <body> element so the <i>font-size</i> property on <div> text becomes <i><b>1.3em (div) * 5pt (body)</b></i>
</div>
<p>This paragraph does not have inherited text color from <body> element</p>
<p>This one does!</p>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now