" tag, syntax text that needs to be bolded"; 2. Use the style attribute in the tag and add "font-weight:bold|bolder ” style, the value “bold” defines bold characters, and “bolder” defines bolder characters."> How to make font bold in html-HTML Tutorial-php.cn

How to make font bold in html

青灯夜游
Release: 2023-01-06 11:15:42
Original
95544 people have browsed it

htmlMethods to bold fonts: 1. Use the "" tag, the syntax text that needs to be bolded"; 2. Use the style attribute in the tag, Add the "font-weight:bold|bolder" style, with the value "bold" defining bold characters and "bolder" defining bolder characters.

How to make font bold in html

This tutorial Operating environment: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Method 1: Use tag

     <b>加粗字体 

这是一段测试文字,这里使用b标签来加粗字体

Copy after login

Operating effect:

How to make font bold in html

We can already see from the picture that the second half of the text has a bold font, which can be compared with the first half of the text (the text is bold). Here we mainly use Thetag in html, the use of thetag in html is very simple, just write the required information directly in thetag Just make the text bold!

Method 2: Use the style attribute in the tag and add the "font-weight:bold|bolder" style

    css 文字加粗  

测试文本!

测试文本!

测试文本!

测试文本!

Copy after login

Rendering :

How to make font bold in html

Description:

The font-weight attribute can set the thickness of the text, which is generally used to set the bold font used in the text of the display element

Attribute values related to the bold effect:

Value Description
bold Define bold characters.
bolder Define bolder characters.
  • 100
  • 200
  • 300
  • 400
  • 500
  • 600
  • 700
  • 800
  • 900
Define characters from thin to thick. 400 is equivalent to normal, and 700 is equivalent to bold.

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to make font bold in html. 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!