font-weight

christian.dinh2481 total contributions
Published Jun 30, 2021Updated Sep 21, 2023
Contribute to Docs
To set the text to be thicker or thinner.
Syntax
font-weight: <font-weight-value>;
The font-style-value
can be the following:
normal
bolder
bold
initial
inherit
lighter
or can be in the form of numerical values from 100
to 900
. The default value is normal
while the default numerical value is 400
.
Example 1
Set the p
tag to bold
:
p {font-weight: bold;}
Example 2
Set the p
tag to 600
:
p {/* This code snippet give the text a semi-bold style */font-weight: 600;}
Note: The way font weight renders can differ from browser to browser. For certain languages, it is not advised to use font weight. This includes languages with complex scripts such as Chinese and Japanese.
All contributors
- christian.dinh2481 total contributions
- Anonymous contributorAnonymous contributor3077 total contributions
- Anonymous contributorAnonymous contributor51 total contributions
- SandeepGopan3 total contributions
- christian.dinh
- Anonymous contributor
- Anonymous contributor
- SandeepGopan
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.