The font weight controls the boldness or thickness of the textual content. The values may be set as regular (default dimension), daring, bolder, and lighter.
<p class=“gentle”>Welcome to PHPGurukul Programming Weblog.</p> <p class=“daring”>Welcome to PHPGurukul Programming Weblog.</p> <p class=“bolder”>Welcome to PHPGurukul Programming Weblog.</p> |
CSS
p.gentle { font–weight: lighter; } p.daring { font–weight: daring; } p.bolder { font–weight: bolder; } |
Output
You may also outline the font-weight with a quantity from 100 (skinny) to 900 (thick), in accordance with how thick you need the textual content to be.
400 is similar as regular, and 700 is similar as daring.
HTML
<p class=“gentle”>Welcome to PHPGurukul Programming Weblog.</p> <p class=“thick”>Welcome to PHPGurukul Programming Weblog.</p> <p class=“thicker”>Welcome to PHPGurukul Programming Weblog.</p> |
CSS
p.gentle { font–weight: lighter; } p.thick { font–weight: daring; } p.thicker { font–weight: 700; } |
Output
The HTML <sturdy> tag additionally makes the textual content daring.