Compare font-size in HTML and CSS

Description

The following code shows how to compare font-size.

Example


<!--   w w w.jav  a 2 s  . com-->
<html>
<head>
<style type='text/css'>
body {
font-family: "Rockwell";
}
h1, h2, h3, h4, h5, h6 {
display: inline;
margin: 0;
font-weight: normal;
}
</style>
</head>
<body>
<div>
<h1>&lt;h1&gt;</h1>
<span style='font-size: 24pt;'>
font-size: 24pt;
</span>
<span style='font-size: xx-large;'>
font-size: xx-large;
</span>
</div>
<div>
<h2>&lt;h2&gt;</h2>
<span style='font-size: 18pt;'>
font-size: 18pt;
</span>
<span style='font-size: x-large;'>
font-size: x-large;
</span>
</div>
<div>
<h3>&lt;h3&gt;</h3>
<span style='font-size: 14pt;'>
font-size: 14pt;
</span>
<span style='font-size: large;'>
font-size: large;
</span>
</div>
<div>
<h4>&lt;h4&gt;</h4>
<span style='font-size: 12pt;'>
font-size: 12pt;
</span>
<span style='font-size: medium;'>
font-size: medium;
</span>
</div>
<div>
<h5>&lt;h5&gt;</h5>
<span style='font-size: 10pt;'>
font-size: 10pt;
</span>
<span style='font-size: small;'>
font-size: small;
</span>
</div>
<div>
<h6>&lt;h6&gt;</h6>
<span style='font-size: 8pt;'>
font-size: 8pt;
</span>
<span style='font-size: x-small;'>
font-size: x-small;
</span>
</div>
<div>
<span style='font-size: 7pt;'>
font-size: 7pt;
</span>
<span style='font-size: xx-small;'>
font-size: xx-small;
</span>
</div>
</body>
</html>

Click to view the demo

The code above generates the following result.

Compare font-size in HTML and CSS