How to set font weight

Example analysis:

The font-weight attribute is used to set the thickness of the text.

The following attribute values ​​can be set:

Define characters from thick to thin. 400 is equivalent to normal, and 700 is equivalent to bold.
ValueDescription
normalDefault value, defines standard characters.
bold Define bold characters.
bolderDefine bolder characters.
lighterDefine finer characters.
##○ 100

○ 200

○ 300

○ 400

○ 500

○600

○700

○800

○900





#     

                                                                                                          

Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> p.normal {font-weight:normal;} p.light {font-weight:lighter;} p.thick {font-weight:bold;} p.thicker {font-weight:900;} </style> </head> <body> <p class="normal">This is a paragraph.</p> <p class="light">This is a paragraph.</p> <p class="thick">This is a paragraph.</p> <p class="thicker">This is a paragraph.</p> </body> </html>
submitReset Code