Difference between <b> and < strong> tags

Difference between <b> and < strong> tags

First of all, both the tags are used in HTML for formatting.

  • In simple language, both are used to make the text bold.

  • Both tags are used to apply bold visual effect to the text.

  • Strong tag semantically emphasizes on the important word or section of words. The only difference is syntax.

Consider the following example:

<!DOCTYPE html>
<html>

<head> 
    <title>b tag</title> 

    <style> 
        body { 
            text-align:left; 
        } 
        h1 { 
            color: red; 
        } 
    </style> 
</head> 

<body> 
    <h1>HASHNODE</h1> 

    <p> 
        a <strong>blogging platform</strong>  
        for those who love to write
    </p> 

    <p> 
        <b>Hashnode:</b> a platform for publishing articles
    </p> 
</body> 

</html>

OUTPUT:

hs.PNG

Now have a look on the output. When it comes to show the importance of the word “blogging platform” we used <strong> tag. Here we are strongly emphasizing on the important word.

And when it comes to just bold the text like "Hashnode", we used <b> tag.

I hope it will be helpful.

Did you find this article valuable?

Support 🍁Welcome to Techie Tweed🍁 by becoming a sponsor. Any amount is appreciated!