Style fontWeight Property
Style fontWeight Property
The fontWeight property is used to either set or returns how thin or thick characters in a text should be displayed.
Syntax:-
Its syntax is:- object.style.fontWeight OR object.style.fontWeight = normal | lighter | bold | bolder | value | initial | inherit
Return:-
Its return is:- string having boldness of the font
Further Explanation:-
Value | Description |
---|---|
normal | The font is normal. |
lighter | Font is lighter |
bold | Font is bold |
bolder | Font is bolder |
100 200 300 400 500 600 700 800 900 |
Defines from light to bold characters. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |