![]() |
VOOZH | about |
The font-weight property in CSS is used to control the thickness or boldness of text. It helps improve the appearance and readability of webpage content.
Syntax:
font-weight: normal | bold | lighter | bolder | number | initial | inherit | unset;When lighter or bolder is specified, the below chart shows how the absolute font weight of the element is determined.
Parent Value | lighter | bolder |
|---|---|---|
100 | 100 | 400 |
200 | 100 | 400 |
300 | 100 | 400 |
400 | 100 | 700 |
500 | 100 | 700 |
600 | 400 | 900 |
700 | 400 | 900 |
800 | 700 | 900 |
900 | 700 | 900 |
Example: The following example demonstrates the use of CSS font-weight property in which the property has been set to different values.
The CSS font-weight property is a powerful tool for controlling the thickness and visual impact of text on a webpage. By utilizing different font-weight values, web designers can create a variety of text effects that enhance readability and visual appeal. Understanding how to leverage this property will significantly improve the typography and overall user experience of your web content. For further learning, explore additional CSS properties and techniques to elevate your web design skills.