font-size with various measurements : measurement : Style Basics HTML CSS TUTORIALS


HTML CSS TUTORIALS » Style Basics » measurement »

 

font-size with various measurements


 
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style rel="stylesheet" type="text/css">
{
  font-family: arial;
  font-size: 12pt;
}

p.px {
  font-size: 12px;
}

p.pt {
  font-size: 12pt;
}

p.pc {
  font-size: 2pc;
}

p.in {
  font-size: 0.5in;
}

p.cm {
  font-size: 1cm;
}

p.mm {
  font-size: 12mm;
}

p.em {
  font-size: 1.5em;
}

p.ex {
  font-size: 1.5ex;
}
</style>
</head>

<body>
<h1>Lengths</h1>
<p class="px">The length used here is 12 px</p>
<p class="pt">The length used here is 12 pt</p>
<p class="pc">The length used here is pc</p>
<p class="in">The length used here is 0.5in</p>
<p class="cm">The length used here is 1cm</p>
<p class="mm">The length used here is 12mm</p>
<p class="em">The length used here is 1.5em</p>
<p class="ex">The length used here is 1.5ex</p>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Style Basics
» measurement