Source code
Revision control
Copy as Markdown
Other Tools
<head>
<title>CSS Test: font-sizes in pixels compared to images in pixels</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/size/007.html" type="text/html"/>
<style type="text/css">
p { color: navy; }
span { color: silver; }
.a { font: 10px Arial, sans-serif; }
.b { font: 20px Arial, sans-serif; }
.c { font: 30px Arial, sans-serif; }
.a img { height: 10px; }
.b img { height: 20px; }
.c img { height: 30px; }
</style>
</head>
<body>
<p class="a">The box X<img src="support/1x1-navy.png"
alt="[FAIL]"/>X should be taller than the Xs on either side of
it. <span>xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxx</span></p>
<p class="b">The box X<img src="support/1x1-navy.png"
alt="[FAIL]"/>X should be taller than the Xs on either side of
it. <span>xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxx</span></p>
<p class="c">The box X<img src="support/1x1-navy.png"
alt="[FAIL]"/>X should be taller than the Xs on either side of
it. <span>xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx
xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxx</span></p>
</body>
</html>