<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of relative units</title>
<style type="text/css">
body {
font-size: 12px;
}
h1 {
width: 50%;
font-size: 3em;
background-color: #ff00ff;
}
p {
width: 80%;
font-size: 2em;
background-color: #fff000;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>