HTML bold tag
The HTML <b> tag defines text to be displayed in bold without conveying additional semantic significance or importance within the document structure.
Syntax:
<b> Contents... </b>
Example: In this example demonstrates the use of the <b> tag to style “bold text” within a paragraph, visually emphasizing it.
<!DOCTYPE html>
<html>
<head>
<title>Bold Tag Example</title>
</head>
<body>
<h2>Using Bold Tag</h2>
<p>This is
<b>bold text</b>
within a paragraph.
</p>
</body>
</html>
Output:
Difference between strong and bold tag in HTML
The HTML <strong> tag is used semantically to emphasize importance, conveying meaning to both sighted and screen readers. In contrast, the <b> tag is solely for visual presentation, making text bold without conveying significance.
Table of Content
- HTML strong tag
- HTML bold tag
- Difference between strong and bold tags in HTML