Home>Article>Web Front-end> How to make text bold in css
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.
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:
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!