Why <strong> and <em> instead of <b> and <i>?


#1

I learned some basic html when I was a kid, and learned that <b> bolds text, and <i> italicizes it. And I've been using those tags ever since, with no problem. But, wanting to refresh my html knowledge beyond those text formatting tags, I started the HTML & CSS course, and it wants me to use <strong> and <em> instead, and marks me wrong if I use <b> and <i>. Why is that? Is there any difference between them (besides that the single-letter tags are easier to type, and more intuitive)?


#2

Bold using b
Bold using strong
Italic using i
Italic using em

As you can see, there is no appearance difference, (at least on my browser) but I guess <b> is used for styling, and <strong> is used as “an indication of how something should be understood”. Read more here: https://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong

Hope this helps!


#3

Thank you for your response; I’m still somewhat confused, but perhaps have some vague idea, about the screen readers at least.

I guess <b> and <i> (as well as <u>) are more intuitive to me because I work as a transcript editor, so italics, bold, and underline are, almost always, strictly matters of formatting (italicizing book titles, magazines, etc; bolding section headlines; underlining links because the site doesn’t have the sense to do it automatically; etc).

I also don’t understand the argument given by some that those tags shouldn’t be used at all because all styling should be handled by CSS; for one thing it’s not always possible to link a separate CSS file (such as in the case of the aforementioned transcripts), and for another thing, why do in many characters what can be done with one, if all you want is basic formatting?

But I guess I’ll keep <strong> and <em> in mind if I ever want to actually emphasize something on a website.


#4

I also don’t understand the argument given by some that those tags shouldn’t be used at all because all styling should be handled by CSS; for one thing it’s not always possible to link a separate CSS file (such as in the case of the aforementioned transcripts), why do in many characters what can be done with one, if all you want is basic formatting?

It separates the styling from the main content, keeping it simpler. Certainly though, you are totally free to use <b>, <strong>, <em>, and <i>.

Hope this helps out a little,
Sean


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.