Home >Web Front-end >HTML Tutorial >How to make font bold in HTML
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.
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>
The running effect 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>The running effect is as follows
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!