How to set bold in css

醉折花枝作酒筹
Release: 2023-01-05 16:10:04
Original
15014 people have browsed it

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.

How to set bold in css

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.

 
枯藤老树昏鸦
Copy after login

Next, you can use font-weight to set boldness in CSS. You only need to set bold.

Copy after login

After running the page, you can see that the font is bolded

How to set bold in css

In addition, font-weight can also be set to a value from 100 to 900. Larger numbers are bolder.

Copy after login

When font-weight is set to 100, the font is the thinnest

How to set bold in css

Finally, when font-weight is set to 900, it is The thickest

How to set bold in css

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!