5

Possible Duplicate:
What's the difference between <b> and <strong>, <i> and <em>?

The purpose of "bold " i.e bold to make the text bold. Then what is the purpose strong tag in html? I have used strong tag to make the text bold.

So what is difference between both the tag.

What are places where i have to use "strong" tag and where i have to use bold tag.

Community
  • 1
  • 1
Shalni
  • 1,017
  • 5
  • 20
  • 32

4 Answers4

13

<b> is for presentation, and <strong> is for context. Visual browsers usually render strong text as bold, but things such as screen readers can render it as a louder voice.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
13

it's really all about semantic HTML.

<b/>

tag doesn't tell you anything about the content, and is thus not a semantic representation of your content.

<strong> 

on the other hand gives you an indication about the semantic meaning of the item you're putting the tag around. Same goes with

<i> and <em>. 
Anatoly G
  • 4,112
  • 2
  • 21
  • 23
  • 1
    `` and `` are not interchangeable; many of the things that are normally represented by italicized text have appropriate tags. When used for emphasis, `` is the tag to use, but one would use a `` tag for things like book and publication titles and `` with a language attribute (and, for styling convenience, a class identifying the span as foreign) for foreign words. In running text, the relationship between bold text and `` is much tighter; most other semantically-significant instances of bold text appear in headings and definition terms in glossaries. – Stan Rogers Oct 20 '10 at 06:47
3

The <strong> tag is a phrase tag.

whereas

The <b> tag is a font-style tags.

Steve Weet
  • 28,126
  • 11
  • 70
  • 86
Egalitarian
  • 2,168
  • 7
  • 24
  • 33
2

Amplifying Anatoly G's answer: <b> and <i> and their ilk were added into HTML by people who didn't understand the whole point of the language and the fact that its tags were for the semantics of your text, not for presentation. Of course to be fair to these people, this is because the people who made HTML at first really had no clue about the uses HTML was going to be put to. As a result a whole bunch of ill-considered tags (<blink> anyone? <frame>?) were added that muddied up the HTML scene badly and that we still have to live with to this day.

These days you should eschew the use of the presentation tags in favour of proper use of CSS so that your tags reflect your semantic intent while your CSS controls the presentation of same.

Community
  • 1
  • 1
JUST MY correct OPINION
  • 35,674
  • 17
  • 77
  • 99