The font-weight property uses numeric values from 100 to 900 in increments of 100. 400 is normal weight, 900 is the boldest. 600 is bolder than normal but lighter than 900.
The correct CSS syntax uses a colon to assign values, like font-weight: bold;. Using equals or missing colon causes errors.
p { font-weight: 300; }<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> p { font-weight: 300; } </style> <title>Font Weight Test</title> </head> <body> <p>This text is light.</p> </body> </html>
Font-weight 300 is lighter than normal (400). The text strokes appear thinner but still visible.
highlight have bold text?To select elements by class, use a dot before the class name. .highlight targets all elements with that class.
Very light font-weight can make text hard to read, especially for people with vision difficulties or on screens with poor contrast. This reduces accessibility.
