Home>Article>Web Front-end> How to make text bold in css

How to make text bold in css

王林
王林 Original
2021-05-20 13:48:27 6835browse

The way to make text bold in css is to set the font-weight attribute for the text and set the attribute value to bolder, such as [p.thick {font-weight:bolder;}], bolder means thicker text.

How to make text bold in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

If we want to make the text bold, we can use the font-weigth attribute in CSS to achieve this. Let us learn about this attribute together.

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

Common attribute values:

  • normal Default value. Defines standard characters.

  • #bold Defines bold characters.

  • #bolder Defines bolder characters.

  • #lighter Defines finer characters.

Code example:

      

This is a paragraph.

This is a paragraph.

This is a paragraph.

This is a paragraph.

Let’s see the running effect:

How to make text bold in css

Learning video sharing:css video tutorial

The above is the detailed content of How to make text bold in css. For more information, please follow other related articles on the PHP Chinese website!

css
Statement:
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