Set font weight to bold for the first text in paragraph : font weight « CSS « HTML / CSS






Set font weight to bold for the first text in paragraph

  
<!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">
p:first-line {
 font-weight: bold;
}
</style>
</head>

<body>

<p>This is a text. This is a text. This is a text. This is a text. 
This is a text. This is a text. This is a text. This is a text. 
This is a text. This is a text. This is a text. This is a text. This is a text. 
This is a text. This is a text. This is a text. This is a text. This is a text. 
This is a text. This is a text. This is a text. 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.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