How to make font bold in HTML

不言
Release: 2022-01-12 15:20:01
Original
147554 people have browsed it

There are two ways to make the font bold in HTML. One is to use the b tag; the other is to use the strong tag. In this article, we will introduce the usage of the b tag and strong tag in HTML.

How to make font bold in HTML

Although both the b tag and the strong tag can make the font bold, they actually have different meanings and different usages. Let’s take a closer look below. See examples of how to use the b tag and the strong tag.

b means bold, which means bold; strong means to emphasize

We are in ? b> or ? Enclose the part you want to bold in strong>

The code is as follows

<!DOCTYPE How to make font bold in HTML>
<How to make font bold in HTML>
<head>
<title></title>
</head>
<body>
<p>
  文字<b>加粗</b>的部分。
</p>
<p>
  文字<strong>强调</strong>的部分。
</p>
</body>
</How to make font bold in HTML>
Copy after login

The running effect is as follows

How to make font bold in HTML

##Due to HTML Basically represents the structure and content itself. If you want to emphasize the meaning, use strong, but if you just want to bold the font, it is recommended to use CSS style instead of b tag here. So let’s take a look at the code example of bold fonts in CSS

The code is as follows

<!DOCTYPE How to make font bold in HTML>
<How to make font bold in HTML>
<head>
<title></title>
<style type="text/css">
p {
  font-weight: bold;
}
</style>
</head>
<body>
<p>
  让文字加粗。
</p>
</body>
</How to make font bold in HTML>
Copy after login
The running effect is as follows

How to make font bold in HTML

This article It’s all over here. For more exciting content, you can pay attention to the relevant column tutorials on the PHP Chinese website! ! !

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