Home > Web Front-end > Front-end Q&A > What does it mean when css font is set to bold

What does it mean when css font is set to bold

WBOY
Release: 2022-04-20 11:31:38
Original
7142 people have browsed it

In CSS, setting the font to bold means setting the font style to bold; bold is the attribute value of "font-weight", which is used to set the thickness of the text. Setting the attribute value to bold means To define bold characters, the syntax is "element {font-weight: bold}".

What does it mean when css font is set to bold

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

What does it mean when the css font is set to bold

bold is the attribute value of font-weight.

The font-weight property sets the thickness of the text.

This attribute is used to set the bold font used in the text of the display element. The numeric value 400 is equivalent to the keyword normal, and 700 is equivalent to bold. The font bold for each numeric value must be at least as thin as the next smallest number, and at least as thick as the next largest number.

  • normal Default value. Defines standard characters.

  • bold Defines bold characters.

  • bolder Defines bolder characters.

  • lighter Defines thinner characters.

  • Numerical values ​​define characters from thick to thin. 400 is equivalent to normal, and 700 is equivalent to bold.

The example is as follows:

<html>
<head>
<style type="text/css">
p.normal {font-weight: normal}
p.thick {font-weight: bold}
p.thicker {font-weight: 900}
</style>
</head>
<body>
<p class="normal">This is a paragraph</p>
<p class="thick">This is a paragraph</p>
<p class="thicker">This is a paragraph</p>
</body>
</html>
Copy after login

Output result:

What does it mean when css font is set to bold

(Learning video sharing: css video Tutorial)

The above is the detailed content of What does it mean when css font is set to bold. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template