Friday, April 2, 2004

B versus using Span and Class

I have a client whose company name is bolded for branding purposes. It got me to thinking - ought the company name be bolded using the <b> tag or by attributes in the <span> tag?

Some have argued that <b> has been deprecated (or will be shortly) in favor of <strong>. It has not been deprecated although w3.org discourages its use in favor of stylesheets. The key difference between <b> and <strong> is that
EM and STRONG are used to indicate emphasis. ... These phrase elements add structural information to text fragments.

What are the relative merits of <b> versus <span>? If ever there was a case for the use the <b> element, this might be it as this its use is first and foremost a visual element. After all one cannot know how a browser will render <strong>. Still I would recommend <span> as the branding may change in time. <span class="logo"> maybe longer to write than <b> but it would solve all issues as rendering information will be located in the style sheets.

<b class="logo"> is an alternative. It will rank higher in today's SEO ranking (although is that really necessary for a logo?) and can be easily changed with a search and replace should the need arive at a later date.

No comments:

Post a Comment