Open In App

Difference between strong and bold tag in HTML

Last Updated : 13 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

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.

HTML strong tag

The strong tag is one of the elements of HTML used in formatting HTML texts. It is used to define text with strong importance, often displayed in bold, contributing to both visual styling and semantic emphasis within the document structure.

Syntax:

<strong> Contents... </strong>

Example: In this example, we demonstrate the use of the <strong> tag to emphasize “Computer science” within a sentence, typically displayed in bold for strong importance.

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Strong Tag Example</title>
</head>

<body>
    <h2>Using Strong Tag</h2>
    <p>GeeksforGeeks a 
        <strong>Computer science </strong> 
        Portal.
    </p>
</body>

</html>

Output:

StrongTag

HTML strong tag output

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.

HTML
<!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:

boldTag

HTML bold tag output

Difference between strong and bold tags in HTML

strong tagbold tag
The <strong> tag is used to define text with strong importanceThe bold (<b>) tag specifies bold text without any extra importance.
The text inside this tag is boldIt makes any text bold.
Conveys importance for both sighted and screen readers.Provides no semantic meaning for screen readers.
Contributes to SEO by signaling importance to search engines.Doesn’t convey importance, less helpful for SEO.
Encouraged for emphasis with importance.Primarily used for visual styling without semantic implications.

Supported Browser: The browser supported by <b> and <strong> tag are listed below.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads