How to set bold font in html

青灯夜游
Release: 2021-12-10 15:02:16
Original
61251 people have browsed it

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>
Copy after login

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>
Copy after login

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>
Copy after login

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!