Nested style layout
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>Chapter 2</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style>
div {
padding: 10px;
border: 4px solid #ccc;
width: 350px;
}
div, p, em, a, code {
font-size: 130%;
}
</style>
</head>
<body>
<div>
<p>
You'll <em>probably</em> be surprised when using <a href="">a relative <code>font-size</code></a> and nested elements.
</p>
</div>
</body>
</html>
Related examples in the same category