<strong> or <b>

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

HI I use Dreamweaver to make websites but I do have an outof date copy of it. IE when I make somthing in bold dreamweaver makes the code <strong>bold text</strong> but I have also found that <b>bold text</b> works as well which is the on to use?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

<strong> is semanticly different from <b>, even though nearly all modern browsers display them the same.

You might use <b> to denote an important word, while you might use <strong> to denote an imortant phrase.
  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Posts: 481

Post 3+ Months Ago

<b> is deprecated now. If you want to display text in bold, use CSS.

As Joe said, <strong> is for important text, and most browsers display it in bold to point out that the text is important.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

I usually use <strong> instead of <b> and no CSS... is that semantically correct or incorrect?
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I use both <strong> and <b>. I tend to use <strong> when I feel one piece of bolded text is more important than another. I usually apply a background color to simulate a highlighter marking from a paper document with <strong> too.

I do the same thing with <em> VS <i>.
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

casablanca wrote:
<b> is deprecated now.


<b> is not deprecated.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

I tend to use <span class='bold'></span> and then just give it a font-weight of bold for sentences, but for single words I use <b> ...
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

joebert wrote:
<strong> is semanticly different from <b>, even though nearly all modern browsers display them the same.

You might use <b> to denote an important word, while you might use <strong> to denote an imortant phrase.


I must say I didn't know that <b> and <strong> were different I just assumed that <strong> was an out-of-date way of making something bold. Thanks! :P
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

tastysite wrote:
joebert wrote:
<strong> is semanticly different from <b>, even though nearly all modern browsers display them the same.

You might use <b> to denote an important word, while you might use <strong> to denote an imortant phrase.


I must say I didn't know that <b> and <strong> were different I just assumed that <strong> was an out-of-date way of making something bold. Thanks! :P

I think completely the opposite :P ... or did until some time ago...
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

Using strong (boldly rendered) emphasis is something to be avoided, most of the time, just stylistically, when writing text. Using <b> to "set things apart", in a way that doesn't provide emphasis, is alluded to by some future version of HTML. Using <b>tastysite write:</b> and <b>joebert wrote:</b> in the quoting of the above post would be one example.

But semantics don't matter, from the end-user's perspective. <b> or <strong> or <span class="myveryverboseclassname"> are all fine. (Maybe it matters to search engines.) The reason to care about semantics, though, is to be flexible in how you can render your document. If you want to change the rendering later with CSS, it makes sense to have a distinction between <strong>emphasis</emphasis> and other forms of <b>setting text apart</b>. But it would make even more sense to separate out semantic meaning with <span="foo"> and <span="bar">. (<span="bold"> is just stupid, though.) Then you have the flexibility to change the style by which things are displayed as you develop your pages.

At least, that would be the case if you wrote your HTML by hand. Which is just the wrong thing to do. It's better to generate HTML, because <span="foo">blah</span> is worse than writing <foo>blah</foo> or {foo blah}
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

HI I must say I not sure it matters because I used this code
Code: [ Select ]
<strong>This is strong text</strong> <b>and this is bold text</b>
and got this http://www.box.net/shared/273qqfjkso and both look the same!
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

Mas Sehguh wrote:
At least, that would be the case if you wrote your HTML by hand. Which is just the wrong thing to do. It's better to generate HTML, because <span="foo">blah</span> is worse than writing <foo>blah</foo> or {foo blah}

Huh?
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

That whole post was a "huh?" moment for me ...
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

<em> and <strong> are not the same as <i> and <b>, respectively, and are not intended for the same purpose.

<i> and <b> are used to make text italic and bold, that's all. They're essentially shortcuts to using things like <span style="font-wight: bold"> (or generic spanning classes).

<em> and <strong>, on the other hand, are intended to be used to add emphasis. Just because browsers usually render these as italic and bold does not mean they are the same. These tags can be rendered differently by different output devices, such as screen readers and mobile devices. In some cases, <em> and <strong> are not rendered as italic and bold text.

http://www.w3.org/TR/html401/struct/text.html#h-9.2.1 wrote:
The presentation of phrase elements depends on the user agent. Generally, visual user agents present EM text in italics and STRONG text in bold font. Speech synthesizer user agents may change the synthesis parameters, such as volume, pitch and rate accordingly.

Thus the two are not directly interchangeable. There's proper uses for both.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

Exactly what spork said... <em> and <strong> don't have a "set" way they will display... I guess reading this thread told me I used <strong> and <em> incorrectly :lol:
  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Posts: 481

Post 3+ Months Ago

Mas Sehguh wrote:
<b> is not deprecated.

Okay, maybe I was wrong about that, but it's still not very good to use <b> (and W3C doesn't recommend it either) because it doesn't actually mean anything.

The reason for using semantic elements like <strong> and <em> is to make your page more accessible - for both humans and machines. For example, a visually-impaired user might use a text-to-speech browser, and using <em> gives the browser a hint that it should emphasize the text, but using <i> just says that the author wanted it displayed in italics for some unknown reason.

As to why I prefer CSS instead of <b> or <i>, it's the same reason as with <font>, which is officially deprecated now.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

Hmmm..

ECHO! (Echo!)... (echo..).....
  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Posts: 481

Post 3+ Months Ago

Oh wow! :) Didn't notice that spork had already posted much of what I have above.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

No worries ;)
  • Divinyl
  • Student
  • Student
  • User avatar
  • Posts: 84
  • Loc: Sydney, Ozland.

Post 3+ Months Ago

I just use <strong> <b> seems old skool now.

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 87 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.