Font Weight in CSS
The font-weight Property
The font weight controls the thickness of the text. Its value ranges from lighter, light, normal, bold, and bolder. Moreover, we can its value from 100 to 900 where 700 is bold and 100 is thin.
Syntax:-
Its syntax is:-
< style >
element{
font-weight: normal| bold| bolder| lighter| number| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
normal | Defines normal characters. |
bold | Defines thick characters |
bolder | Defines thicker characters |
lighter | Defines lighter characters |
100 200 300 400 500 600 700 800 900 |
Defines from thin to thick characters. 400 is the same as normal, and 700 is the same as bold |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |