|Bold Tag Deprecated?|
| 10:25 pm on Mar 23, 2006 (gmt 0)|
I'm just brushing up on my web skills by doing a few courses, and one of the trainers I was listening to said that the bold tag had been deprecated in favour of the strong tag. Likewise, the <i> tag had been deprecated in favour of <em>.
However, I have also heard SEO gurus recommend using the bold tag to emphasise certain keywords.
Who's right? If you use the <strong> tag, will you get the same SEO benefits?
| 10:56 pm on Mar 23, 2006 (gmt 0)|
They arent depreciated they have different meanings, <i></i> and <b></b> are used to format the text, and <strong></strong> and <em></em> are used for highlighting language characterstics. And they are part of the markup specifications. But because you can format the text using CSS in my opinion <strong></strong> and <em></em> would be better for SEO, and to semantically highlight parts of your text.
| 8:59 am on Mar 28, 2006 (gmt 0)|
<b> and <i> have been removed completely in XHTML 2.0. However, there is a reason to use them now and then, as someone once pointed out: What if you have a logo where the first letter is bold, or italic, but you don't want it to be seen as emphasised? If you use <strong> or <em> then this will affect speech readers.
I can't see everyone swapping <b> for <strong> any day soon, as it's so much easier to type just <b>. And in HTML 4, it makes absolutely no difference to the display.
| 1:35 pm on Mar 28, 2006 (gmt 0)|
The bold and italic elements <b> and <i> are deprecated in a sense that this can now be done much easier and more versatile with CSS. The same for the font element <font>.
But someone who teaches you that <b> should be replaced with <strong> and <i> with <em> hasn't got the slightest idea of the meaning of these elements. Both <strong> and <em> are semantical elements (just as <code>, <abbr> and others) and most browsers have chosen to display them in bold and italic, but this is just a choice. The true meaning of these element is to emphasize the enclosed text, but the standard doesn't tell how to render the enclosed contents. From the HTML 4.01 specs:
|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. |
Browsers will recognize the <b>, <i> and <font> elements for many years to come so existing sites shouldn't worry. But for new pages it is good to decide of alternate rendering is necessary because of semantic reasons (use <strong> and <em> ) or graphical reasons. In the latter case I would use CSS.
| 6:07 pm on Mar 28, 2006 (gmt 0)|
The <b> and <i> elements still have a proper usage, typographic convention. For example, it is convention that a journal article's title be italicized, while the journal's title be in bold type. There is no meaning of emphasizing nor strongly emphasizing the titles. Likewise, a foreign word or phrase should be italicized. We might speak disparagingly of a soi-disant expert at whatever. It might be argued that the phrase should have been wrapped in a span element with the lang="fr" attribute, but until IE7 is in wide use, that's not helpful typographically.
| 8:12 am on Mar 29, 2006 (gmt 0)|
Perhaps we should be using <span class="bold"> instead of <b> or <strong>? That way the browser would not apply a default style. Of course any emphasis would be lost when CSS was turned off.
| 5:22 pm on Mar 29, 2006 (gmt 0)|
|What if you have a logo where the first letter is bold, or italic, but you don't want it to be seen as emphasised? |
That's why you use CSS. You certainly don't want to break it up by adding multiple tags. Screen readers are likely to treat them as separate words.
| 5:31 pm on Mar 29, 2006 (gmt 0)|
|Of course any emphasis would be lost when CSS was turned off. |
...as Gmail does and most web mail services are doing now.
| 2:52 am on Mar 30, 2006 (gmt 0)|
|Perhaps we should be using <span class="bold"> instead of <b> or <strong>? |
<span class="bold"> is completely meaningless in terms of semantics, has no fallback styling for non-CSS user agents, and is much more verbose than simply using
<span class="bold"> is just as presentational as
<b> too - it serves no other purpose than for style.
I often use
<i> as generic inline containers rather than using a
<span> - they can be styled in the same way as any other element.
|<b> and <i> have been removed completely in XHTML 2.0 |
As the final specification hasn't been published, it is impossible to tell whether they will be in XHTML 2.0 or not - but as XHTML 2.0 will not be backwards-compatible anyway, there is really no comparison between current markup practices and potential future standards.
|Likewise, a foreign word or phrase should be italicized. (...) It might be argued that the phrase should have been wrapped in a span element with the lang="fr" attribute |
It is usually best to do something like this:
<p>A [b]<i lang="fr">[/b][i]soi-disant[/i][b]</i>[/b] expert.</p>
Again, no need to use a span.
| 9:10 am on Mar 30, 2006 (gmt 0)|
|<span class="bold"> is just as presentational as <b> too - it serves no other purpose than for style |
With <b> the browser will make the text bold. But we are told to remove presentation from our markup and just leave semantics. What if I want to emphasize the text but not make it bold, as it doesn't fit the layout? I have to restyle the bold tag in CSS. At least <span> has no presentational meaning, so could be styled anyway you like, eg: bold, italic, underlined.
|<p>A <i lang="fr">soi-disant</i> expert.</p> |
Again, no need to use a span.
I'm pretty sure this is the wrong way to do it. Again, you're forcing the markup to indicate foreign words as italic. I've always seen spans used for showing language, as they do not force a style on the user.
| 8:11 am on Apr 1, 2006 (gmt 0)|
[quote=Hester] I've always seen spans used for showing language, as they do not force a style on the user. [/quote]The trouble with that is in IE's not grokking the [attr] selector. Without also giving the span a class, you can't style it for typographic purposes. encyclo's suggestion of <i lang="fr">soi- disant</i> is a good enough idea so far. I have no problem with using b and i, for now, as a convention indicator. They kinda say, 'this is an item that should be indicated by certain convention'.