954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Bold

What's the difference between the and the font tags?

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

is XHTML compliant I think

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

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

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

and came first, then and , which became popular for use with the tag. has become depricated, possibly and will follow as and 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.

andThe and 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 and tags are primarily for visual effect on a page when designing layout.

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

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?

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 
rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

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

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

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

aswettla
Newbie Poster
8 posts since Jan 2003
Reputation Points: 46
Solved Threads: 0
 
Then why does vBulletin 3 gamma - with the new XHTML compliant styles - use ?


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

Gary King
PHP/vBulletin Guru
Team Colleague
417 posts since Nov 2003
Reputation Points: 53
Solved Threads: 5
 

There's a lot of content out there < HTML 4 that uses the 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 tag in the future).

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

samaru
a.k.a inscissor
Team Colleague
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18
 

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

HTML code probably came first though ( instead of [b])

The Dude
Nearly a Senior Poster
3,485 posts since Dec 2005
Reputation Points: 1,054
Solved Threads: 31
 

and 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.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

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

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

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.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

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 ;)

Gary King
PHP/vBulletin Guru
Team Colleague
417 posts since Nov 2003
Reputation Points: 53
Solved Threads: 5
 

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. ;)

roryt
Nearly a Posting Virtuoso
1,286 posts since Oct 2005
Reputation Points: 178
Solved Threads: 15
 

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 is a media specific presentational choice for text, while 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..

MattEvans
Veteran Poster
Moderator
1,386 posts since Jul 2006
Reputation Points: 522
Solved Threads: 64
 

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. ;)

roryt
Nearly a Posting Virtuoso
1,286 posts since Oct 2005
Reputation Points: 178
Solved Threads: 15
 

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.

devdan
Newbie Poster
3 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

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

roryt
Nearly a Posting Virtuoso
1,286 posts since Oct 2005
Reputation Points: 178
Solved Threads: 15
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You