Home>Article>Web Front-end> How to set bold in css
In CSS, you can use the "font-weight" attribute to set boldness. You only need to set the "font-weight:bold|700" style to the element. The font-weight attribute sets the thickness of the text. The numeric value 700 is equivalent to bold. When the value is bold, it means defining bold characters.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Create a new HTML page, add the HTML structure, and then add fonts in the body area, placing it in a div.
枯藤老树昏鸦
Next, you can use font-weight to set boldness in CSS. You only need to set bold.
After running the page, you can see that the font is bolded
In addition, font-weight can also be set to a value from 100 to 900. Larger numbers are bolder.
When font-weight is set to 100, the font is the thinnest
Finally, when font-weight is set to 900, it is The thickest
Recommended learning:css video tutorial
The above is the detailed content of How to set bold in css. For more information, please follow other related articles on the PHP Chinese website!