Page 182 - CA_165_V2.0_Flipbook
P. 182
</HTML>
Font Weight
The font-weight property in CSS is used to set the thickness or boldness of the text. It allows developers
to adjust the visual weight of the text, making it lighter or bolder depending on the desired effect.
The font-weight property can take several values, ranging from numeric values to predefined keywords.
These values define how bold or light the text should appear.
Values for font-weight:
1. Predefined Keywords:
normal: This is the default weight of the text, typically equivalent to 400.
bold: This makes the text bold, equivalent to 700.
bolder: This makes the text bolder than its parent element's text weight.
lighter: This makes the text lighter than its parent element's text weight.
2. Numeric Values:
Values range from 100 to 900:
● 100: Lightest weight.
● 400: Normal weight (default).
● 700: Bold weight.
● 900: Heaviest weight.
Syntax to use the font-weight property is as follows:
<P STYLE="FONT-WEIGHT:VALUE;">
TEXT
</P>
Example with HTML Code:
<HTML>
<HEAD>
<TITLE>Font Weight Example</TITLE>
</HEAD>
<BODY>
<P STYLE="FONT-WEIGHT: NORMAL;">This is normal text. </P>
180 Touchpad Computer Applications-X

