Font weight controls how thick or thin the text looks. It helps make words stand out or look lighter.
Font weight in CSS
font-weight: value;The value can be keywords like normal or bold, or numbers from 100 to 900 in steps of 100.
Higher numbers mean thicker text. Default is usually normal (400).
font-weight: normal;font-weight: bold;font-weight: 300;font-weight: 900;This page shows four paragraphs with different font weights: normal, bold, light, and heavy. You can see how the thickness of the text changes.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Font Weight Example</title> <style> body { font-family: Arial, sans-serif; padding: 1rem; line-height: 1.5; } .normal { font-weight: normal; } .bold { font-weight: bold; } .light { font-weight: 300; } .heavy { font-weight: 900; } </style> </head> <body> <p class="normal">This text is normal weight (400).</p> <p class="bold">This text is bold weight (700).</p> <p class="light">This text is light weight (300).</p> <p class="heavy">This text is heavy weight (900).</p> </body> </html>
Not all fonts support every numeric weight. If a weight is not supported, the browser picks the closest available.
Using keywords like normal and bold is simpler and more compatible.
Font weight affects readability and style, so choose weights that fit your design and audience.
Font weight changes how thick or thin text looks.
You can use keywords like normal and bold, or numbers from 100 to 900.
Different weights help highlight or soften text in your design.