CSS Font-Weight
The font weight controls the boldness or thickness of the text. The values can be set as normal (default size), bold, bolder, and lighter.
1 2 3 |
<p class="light">Welcome to PHPGurukul Programming Blog.</p> <p class="bold">Welcome to PHPGurukul Programming Blog.</p> <p class="bolder">Welcome to PHPGurukul Programming Blog.</p> |
CSS
1 2 3 4 5 6 7 8 9 |
p.light { font-weight: lighter; } p.bold { font-weight: bold; } p.bolder { font-weight: bolder; } |
Output

You can also define the font-weight with a number from 100 (thin) to 900 (thick), according to how thick you want the text to be.
400 is the same as normal, and 700 is the same as bold.
HTML
1 2 3 |
<p class="light">Welcome to PHPGurukul Programming Blog.</p> <p class="thick">Welcome to PHPGurukul Programming Blog.</p> <p class="thicker">Welcome to PHPGurukul Programming Blog.</p> |
CSS
1 2 3 4 5 6 7 8 9 |
p.light { font-weight: lighter; } p.thick { font-weight: bold; } p.thicker { font-weight: 700; } |
Output

The HTML <strong> tag also makes the text bold.