Set font-size to 0.75em; (25% smaller) in HTML and CSS

Description

The following code shows how to set font-size to 0.75em; (25% smaller).

Example


<html>
<head>
<style type='text/css'>
body {<!--from   w w w  .  ja  v a  2s  . c o  m-->
font: 16px sans-serif;
}
span {
background: mistyrose;
}
</style>
</head>
<body>
<p>
The font-size property supports a variety of methods for
specifying a font size.  For example, there
are seven different absolute size keywords, which set the
font size relative to the user's font size preference.
</p>
<ul>
<li style='font-size: xx-small;'>xx-small</li>
<li style='font-size: x-small;'>x-small</li>
<li style='font-size: small;'>small</li>
<li style='font-size: medium;'>medium</li>
<li style='font-size: large;'>large</li>
<li style='font-size: x-large;'>x-large</li>
<li style='font-size: xx-large;'>xx-large</li>
</ul>
<p>
You can also make fonts
<span style='font-size: larger;'>larger</span> or
<span style='font-size: smaller;'>smaller</span> by way
of the <span style='font-size: larger;'>larger</span> or
<span style='font-size: smaller;'>smaller</span> keywords.
</p>
<p>
You can make fonts
<span style='font-size: 150%;'>50% larger</span>
or <span style='font-size: 75%;'>25% smaller</span> by way
of percentages.
</p>
<p>
You can even make a font
<span style='font-size: 1.5em;'>50% larger</span>
or <span style='font-size: 0.75em;'>25% smaller</span> by way
of em units.
</p>
</body>
</html>

Click to view the demo

The code above generates the following result.

Set font-size to 0.75em; (25% smaller) in HTML and CSS