" tag; the syntax "bold text"; 2. Use the "" tag, the syntax "bold text< /strong>"; 3. Add the "font-weight:bold;" style to the text element."/> " tag; the syntax "bold text"; 2. Use the "" tag, the syntax "bold text< /strong>"; 3. Add the "font-weight:bold;" style to the text element.">

Home >Web Front-end >HTML Tutorial >How to set bold font in html

How to set bold font in html

青灯夜游
青灯夜游Original
2021-12-10 15:02:1661365browse

htmlHow to set bold: 1. Use the "" tag; syntax "bold text"; 2. Use the "" tag , the syntax is "bold text"; 3. Add the "font-weight:bold;" style to the text element.

How to set bold font in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

htmlSet bold

1. Use the "" tag

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
		正常文本<br><br>
		<b>粗体文本</b>
	</body>
</html>

How to set bold font in html

2. Use the "" tag

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
		正常文本<br><br>
		<strong>粗体文本</strong>
	</body>
</html>

How to set bold font in html

##3. Use the style attribute Add the "font-weight:bold;" style to the text element

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
		正常文本<br><br>
		<span style="font-weight: bold;">粗体文本</span>
	</body>
</html>

How to set bold font in html

Recommended tutorial: "

html video tutorial"

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

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