CSS font-weight Property
Example
.example1 {
font-weight: normal;
}
.example2 {
font-weight: bold;
}
.example3 {
font-weight: 900;
}
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Meaning
The font-weight property sets the weight, or relative boldness, of text.
Default value: | normal |
Inherited: | Yes |
Animatable: | Yes |
Version: | CSS1 |
JavaScript syntax: |
|
Standard Syntax
font-weight: normal|bold|bolder|lighter|number|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description | |
---|---|---|
normal | This is default value. Defines normal characters. | Hello World! |
bold | Defines bold characters. | Hello World! |
bolder | Defines bolder characters. | Hello World! |
lighter | Defines lighter characters. | Hello World! |
number | Defines from lighter to bolder characters (400 is the same as normal). |
|
initial | Sets this property to its default value. | Hello World! |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. | Hello World! |
revert | Reverts the cascaded value of the property from its current value to the value the property | Hello World! |
revert-layer | Rollback styles to the ones specified in previous cascade layers. | Hello World! |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. | Hello World! |
Default CSS Property Values
selectors {
font-weight: normal;
}