font weight for p : font weight « CSS « HTML / CSS






font weight for p

   
<?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 type='text/css'>
p {font-family:arial; font-size:12pt;}

p.normal {font-weight:normal;}
p.bold {font-weight:bold;}
p.lighter {font-weight:lighter;}
p.bolder {font-weight:bolder;}
p.onehundred {font-weight:100;}
p.seven hundred {font-weight:700;}
</style>


</head>

<body>
<p class="normal">The value for font-weight in the first paragraph is normal.</p>
<p class="bold">The value for font-weight in the second paragraph is bold.</p>
<p class="lighter">The value for font-weight in the third paragraph is lighter.</p>
<p class="bolder">The value for font-weight in the fourth paragraph is bolder.</p>
<p class="onehundred">The value for font-weight in the fifth paragraph is 100.</p>
<p class="sevenhundred">The value for font-weight in the sixth paragraph is 700.</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
7.font weight and bolder
8.font weight lighter
9.font-weight:normal; font-weight:bold; font-weight:lighter; font-weight:bolder;
10.font weight settings
11.font weight normal
12.Set font weight to bold for the first text in paragraph
13.Header text-transform: uppercase;
14.font-weight:900; assigns the constant 900 to font-weight.
15.font weight bolder
16.use the following constants for font-weight: normal, bold, bolder, lighter.
17.Font Weight by number
18.Font weight by value