What's the difference between the <b> and the <strong> font tags?

<strong> is XHTML compliant I think

(Something to that effect, but both tags accomplish the same thing)

I did a google search and I came up with the following stuffs:

<strong> and <em> came first, then <b> and <i>, which became popular for use with the <font> tag. <font> has become depricated, possibly <b> and <i> will follow as <strong> and <em> more closely follow the origianl spirit if HTML and separating content from mark-up.

There is no real difference, except for that pesky habit of some browsers to employ one recommendation while another ignores recommendations all together.

and

The <strong> and <em> tags are "logical" tags. This means that they are used deliberately when the designer wants to add emphasis to particular words or phrases. Some screen readers may use a different inflection when they come across these tags to communicate the emphasis. The <b> and <i> tags are primarily for visual effect on a page when designing layout.

Hmm, very interesting. I always used to use strong but now I alternate. Which would you recommend if I was trying to be XHTML compliant?

<strong>

Then why does vBulletin 3 gamma - with the new XHTML compliant styles - use <b> ?

<strong> is will be supported by a wider range of Browsers, and it is also easier to export that text to XHTML

Then why does vBulletin 3 gamma - with the new XHTML compliant styles - use <b> ?

Quick answer: <b> is XHTML compliant too (even when using strict XHTML compliant code)

There's a lot of content out there < HTML 4 that uses the <b> tag. I doubt any time soon that it would not be supported. The good thing about XML is it doesn't matter what tag it uses, you can always apply some stylesheet and apply your own style (even if the browsers decide not to support the <b> tag in the future).

Personally, I prefer using shorter tags. I'd rather use the <b>, or <i> tag but I'm sticking to the longer tags (<strong> and <em>). They will be more mainstream in the long run.

I have also always wondered what the differences were......

HTML code probably came first though (<b> instead of )

<b> and <i> are expected to be deprecated in the next version of W3C XHTML, so don't start using them. They were left because there are a few old browsers that handle strong and b in different ways.

Beware The Deprecator! He comes and waves his magic mouse, and turns your perfectly good code into Tag Soup.

thats silly. I do all my code in notepad and i cant be bothered typing <strong> when i can just type <b>

Tell W3C.

I think deprecting tags is like telling English speaking people they can't use the words "program." "can," and "tree" anymore.

And notice that their replacement solutions for everything they deprecate uses more typing.

Tell W3C.

I think deprecting tags is like telling English speaking people they can't use the words "program." "can," and "tree" anymore.

And notice that their replacement solutions for everything they deprecate uses more typing.

Just because it's deprecated doesn't mean it can't be used anymore. We'll have to wait another 10 years for that to happen ;)

Isn't it just a good idea just to use them to style differently. So you could set a different font-weight for bold and strong?

That's what I would do but I have never actually noticed this problem before. ;)

If I remember my spec docs correctly; one of the driving forces for strong rather than b is that vocally (in context of screenreading technology); strong can mean 'talk loudly and/or assertively' whereas b is a bit meaningless outside of visuals. So <b> is a media specific presentational choice for text, while <strong> is a meaningful (buzzword: semantic) attribute for text that can be considered media-independant, even process independant.

That said; I don't see why they can't continue to co-exist simultaneously as they do now.. I might want to write in bold without having to worry about screenreaders yelling at their users, or the importance of my bold words being considered too highly..

thats really intersting and i would never have thougt of that. surely if you didn't want your word to be shouted at the user you could just use a span and style it so that it has a bold font weight.

but thanks for that. very interesting. ;)

the strong and emphasis tags are also recommended for use when you have a site that will possibly be used by screen readers or accessibility aids. Doh. Didnt see some1 had mentioned this already. These tags are also more compliant and infact not as old/deprecated than the B and I tags.

Also ideally u want to have any font or other properties specified in CSS rather than in the file direct as this is also more compliant than specifying the characteristics on the fly.

As for the deprecation comment. Compliant Browsers are starting to not use deprecated methods which is why u get code that works in one browser but works differently in another. Its good practice to use NON deprecated code because u ensure that it is more compatible with a wider range of browsers.

yeh... I barely every really use the <b> or <strong> tags because I style it in my css but I don't really find myself using bold text anyway tbh.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.