<strong> or <b>

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post July 7th, 2008, 1:40 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 7th, 2008, 1:40 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post July 7th, 2008, 2:21 am

<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.
Strong with this one, the sudo is.
  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 29, 2007
  • Posts: 481
  • Status: Offline

Post July 7th, 2008, 7:13 am

<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.
No Strings Attached: A JavaScript graphics demo.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post July 7th, 2008, 11:27 am

I usually use <strong> instead of <b> and no CSS... is that semantically correct or incorrect?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post July 7th, 2008, 11:46 am

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>.
Strong with this one, the sudo is.
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Aug 07, 2004
  • Posts: 1853
  • Status: Offline

Post July 8th, 2008, 6:05 am

casablanca wrote:
<b> is deprecated now.


<b> is not deprecated.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Joined: Mar 12, 2007
  • Posts: 6228
  • Loc: South-Africa
  • Status: Offline

Post July 8th, 2008, 6:21 am

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> ...
Let's leave all our *plum* where it is and go live in the jungle ...
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post July 8th, 2008, 11:05 am

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
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post July 8th, 2008, 12:35 pm

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...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Aug 07, 2004
  • Posts: 1853
  • Status: Offline

Post July 8th, 2008, 9:47 pm

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
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post July 9th, 2008, 1:07 am

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
  • Joined: Sep 22, 2003
  • Posts: 6130
  • Loc: Seattle, WA
  • Status: Offline

Post July 9th, 2008, 7:38 am

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?
The Beer Monocle. Classy.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Joined: Mar 12, 2007
  • Posts: 6228
  • Loc: South-Africa
  • Status: Offline

Post July 9th, 2008, 7:44 am

That whole post was a "huh?" moment for me ...
Let's leave all our *plum* where it is and go live in the jungle ...
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6130
  • Loc: Seattle, WA
  • Status: Offline

Post July 9th, 2008, 7:46 am

<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.
The Beer Monocle. Classy.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post July 9th, 2008, 10:38 am

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:
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 9th, 2008, 10:38 am

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 178 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.