Learn the Difference Between <b> and <strong> in HTML

Hey Ashley! I’ve been trying to learn HTML, and I noticed that it taught me some formatting that I’m not used to like bold and italic being (well I forgot) but I think bold was <b>. And I know bold is in the normal editors. So what’s the difference of the usage and can you mix both up!

Thanks Ashley! You’re awesome.

Shannellle

Hiya! πŸ™‚ If I’m understanding you correctly, are you referring to these differences?

<b> vs <strong>
<i> vs <em>

For the sake of answering this, we’re going to group together <b> and <i>; and <strong> and <em>

<b> and <i> refer to styles. If you use <b> it means you want the text to look bold purely for stylistic reasons. Same goes for <i>. If you use that code, it means you want the text to be italicized purely for stylistic reasons.

However, you would use <strong> if you wanted that bit of text to look bold and have emphasis. That means it’s an important piece of information.

So why is there a difference?

In terms of you looking at the output on a page, there is no visual difference. They look exactly the same. The difference comes with text-to-speech programs, often used by blind people. When blind people look at a website, all the text is spoken to them. If you use <b>, the voice program will not do anything differently when reading that text. But if you use <strong>, the voice program might speak the text differently—with emphasis, or in a different tone of voice. This is done to convey to the blind person that the text is important in some way. Same goes for using <em>.

Also, using <strong> instead of <b> means you’re using Semantic Markup, which is best practice these days.

So here’s a good example: You remember in school when you were told italicize the titles of books? Well that’s purely for stylistic reasons. So that would be a good reason to use <i> because the title of a book doesn’t need emphasis, it’s just italicized to make it look a certain way.

But then let’s say you need to convey some important rules to someone when requesting a review, like this:

I accept review requests from authors but only if the book is Young Adult.

I want to put emphasis on the word “only” because it’s important, so that would be a case to use <em> instead of <i>.

I hope that answers your question!

Photo of Ashley
I'm a 30-something California girl living in England (I fell in love with a Brit!). My three great passions are: books, coding, and fitness. more »

Don't miss my next post!

Sign up to get my blog posts sent directly to your inbox (plus exclusive store discounts!).

You might like these

32 comments

    1. They probably leave the “b” and “i” buttons like that because when most people think of “bold” they look for a “b” (as opposed to an “s” for “strong”). πŸ™‚

  1. I never knew there was a difference between the two, but I can see what you’re saying in terms of the purposes they’re used for. I’ve always just used the or tag because I think that’s the default setting whenever I bold or italicize something. But I’m definitely keeping what you said in mind. thanks for sharing, Ashley! <33

    Eileen @ Singing and Reading in the Rain recently posted: Unhinged by AG Howard
  2. Not sure why my post above is missing the coding i put in it? Any way i had given strong and b above where the sentences are broken

    1. Hehe because when you type them outright, they turn into actual code to make it bold πŸ˜‰ You have to use special characters to make it show up like <b>

      This is what I actually typed:

      &lt;b&gt;
  3. The things you know never cease to amaze me!

    I’ve only noticed this difference recently, but thank you for clearing it up! I had no clue what the difference was, and used them interchangeably. I will make sure to rectify that situation moving forward!

  4. Ashley, why is it that you know every thing about single aspect of coding? Like, if coding was some story, you’re like one of those people who know every single detail about everything. And I probably compliment in every one of your BBB posts, but I AM IN AWE OF YEH ASHLEH. <–speech affected by awe

    And thank you so much for answering my question! I'm so happy you were able to understand my question despite my lack of information. Now I finally know the difference! *throws confetti*

    Shannelle C. recently posted: I Have A Problem
  5. Thanks for this enlightenment. When I started blogging, my mind was on <b> but when I get to forums(bbpress and some others) I use to see <strong> due to my frequent use of forums, I forget <b> but some days, I will just be wondering what actually was changed because what am seeing is not what I knew.
    Thanks for clearification.

  6. Yes, thanks, finding the true diff between bold and stong is elusive, you spelled it out nicely!

  7. Thanks, I know this is old, I have always used the , and noticed some text to html editors would use , and I never knew why. Now I’m one stop closer to a coding bassassman. <– Did I do that right? lol.

  8. Howdy! I could have sworn I’ve been to this website before but aftr going through many of the posts
    I realized it’s new to me. Regardless, I’m definitely pleased I stumbled upon it and I’ll be bookmarking
    it and checking bck frequently!

Recent Posts

    Random Posts