use the following constants for font-weight: normal, bold, bolder, lighter. : font weight « CSS « HTML / CSS






use the following constants for font-weight: normal, bold, bolder, lighter.

  



<!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></title>
<style type="text/css">
h2 { 
  font-weight:lighter;
}
</style>
</head>
<body>
  <h2>This is a header
  this is a test. this is a test. 
  this is a test. this is a test. 
  this is a test. this is a test. 
  this is a test. this is a test. 
  this is a test. this is a test. 
  this is a test. this is a test. 
  </h2>
  <p>This is a text.</p>
</body>
</html>

   
  








Related examples in the same category

1.'font-weight' Example
2.font-weight: lighter
3.font-weight: bolder
4.font-weight by number from 100 to 900
5.font-weight: normal, bold, bolder, lighter
6.font weight for p
7.font weight
8.font weight and bolder
9.font weight lighter
10.font-weight:normal; font-weight:bold; font-weight:lighter; font-weight:bolder;
11.font weight settings
12.font weight normal
13.Set font weight to bold for the first text in paragraph
14.Header text-transform: uppercase;
15.font-weight:900; assigns the constant 900 to font-weight.
16.font weight bolder
17.Font Weight by number
18.Font weight by value