views:

160

answers:

6

Possible Duplicate:
Is it ok to use <strong> in place of <b> blindly ?

When to use <strong> and when to use <b> or other ways to give look of bold? strong has semantic value ( and useful for screen reader while b is presentation (and even valid in HTML 5).

my question is not what is the difference between strong and b.

The question is when to use semantic tag and when to use just to make text bold

Should I always use <strong> if client's content files (MS word files) has some words bold in content paragraphs?

alt text

How can we know when client want to give emphasis to text and when he just want to make text bold for presentation/aesthetic purpose?

If it's client job to tell us, then how to explain this scenario to client to give us clear info on "when he just want to make text bold for presentation/aesthetic purpose" ?

+1  A: 

If you're doing a conversion of a word document to HTML, then I think <b> is a better choice, because you're conveying the fact that the text was bold in the word document. Word uses styles to apply semantic meaning, so if it's marked with the "Strong" style, then you use the <strong> tag in the HTML.

Dean Harding
MS Word only has button for to make text Bold. I think there is no button to make Strong.
metal-gear-solid
@metal-gear-solid: Of course there is: select text, apply the "Strong" style. It's not a single "strong" button, but styles are the "semantic" way to markup word documents.
Dean Harding
@codeka: thing is, 95% of the Word users do not use styles (mostly because they do not know they exist)
nico
@nico: I know. We're kind of winning the war against `<b>` in HTML, but I think using styles over the "B" button is a lost cause in Word ;)
Dean Harding
@codeka styles are certainly more prominent in the UI than they were before, right there at the top, quite large. I think there's hope.
Douglas
+3  A: 

There's no "right" answer to this (which is probably why semantic markup isn't in a good state).

Depending on the way your client works I'd say your proposal to replace emboldened content in paragraphs with <strong>, and everything else with relevant heading styles, is reasonable. It may be a good idea to sample the documents to establish what practice has been used.

Jeremy McGee
+4  A: 

I've always followed a simple rule of thumb:

  • <strong> means "strong emphasis", and implies no particular visual style. It has semantic meaning, but could look like anything.
  • <b> is used to apply a bold visual effect to text, but is a presentational tag like <font> and so should be avoided (where possible) in favour of CSS.
Chris
This is not my question. BY THE WAY what alternative will you use as a CSS alternative for `<b>`?
metal-gear-solid
@metal-gear-solid: `font-weight: bold;` perhaps?
Dean Harding
@codeka- i don't want to make whole <p> bold.
metal-gear-solid
@chris - my question is, when to use <strong> and when to use <b> or any css alternative? see first line of my question. the thing you explained i already know.
metal-gear-solid
@metal-gear-solid - The rule is, "if your text needs *semantic emphasis*, then use <strong>", which answers your question pretty well I think. A <span> implies no semantic or presentational meaning, and could be used as a CSS hook instead of <b>. It's not ideal, and not something I personally would do, but it works... I've never had to bold certain parts of a paragraph just for presentational effect so I can't give you a complete guide here.
Chris
Personally I use `strong` or `em` when I imagine the word being emphasized when it's read. That's my definition of "semantic emphasis." Words that are bolded without actually being emphasized -- like, say, vocabulary words in an elementary school textbook -- get bolded with `b` or CSS.
Max Lybbert
`b` != `font` (b is not deprecated). And *(where possible)* in your post, should be emphasized :)
takeshin
+1  A: 

First ask the client "why have you highlighted these words?" and use that to inform your decision. If you can't get a clear answer, I'd use <B> since it's better to not imply that there are semantics to the highlighted words when in fact there are none. Use of <B> can be used as a clear indication that you have unsatifactory presentational markup, and therefore helpful to future maintainers that it can be freely corrected in the light of new information about the reason for the highlighting.

Alohci
+1 I liked ur answer
metal-gear-solid
A: 

Using CSS to define a style other than default bold for a <strong> tag is understandable.

Using CSS the same way on a <b> tag would be more questionable.

mouviciel
+1  A: 

How can we know when client want to give emphasis to text and when he just want to make text bold for presentation/aesthetic purpose?

Read the client's text with understanding.

  • use <strong> when the context says that the bold text is more important than the other (and it is inline)
  • use <b> if it just should be bold (even in database, feed reader or without stylesheets). In this case boldness may be used to catch the readers eye.

When in doubt, ask the client what did he meant.

To save you and yourself a hassle, ask the client to use formatting styles in his editor. This is very useful feature, pity that there few people who do know what for this feature is.

Edit:

This is strong and this is bold. Any difference?

All the problems begin here. If the strong were by default colored RED (no red markup on SO), and normal weight, there would be no questions like this.

takeshin