Set font size to 80% smaller in HTML and CSS

Description

The following code shows how to set font size to 80% smaller.

Example


<html>
<head>
<!--  w w  w .j a v a2s. co  m-->
<style type='text/css'>
body {
font-size: 18px;
}
p {
font-size: 90%;
}
</style>
</head>
<body>
This font is 18 pixels in size.
<p>
This font is 90% of the 18 pixel size specified for the &lt;body&gt;
element.
</p>
</body>
</html>

Click to view the demo

The code above generates the following result.

Set font size to 80% smaller in HTML and CSS