views:

555

answers:

14

(This is more of a curiousity question than any pending disaster :D )

So the <b> and <i> tags have been around since near the beginning of the web (I assume). But now we have CSS and many people apposing "stylistic html tags." They are stylistic tags, but they're really not so bad, as they save us from having to make a <span class="bold"> a whole bunch of times, reducing download times. Seeing as they don't take up much space, are easy to use, can possibly be useful to screen-readers, search engines, and other applications that don't care much about how a document looks, and removing them would break TONS of html code, I'm guessing probably not, but I still wanted to bring up the topic. :)

+6  A: 

I believe the "separate style from presentation" guideline is to use <em> and <strong> instead of <i> and <b>, no <span> required.

Andrew Coleson
A: 

In XHTML 2.0 they are. I'm not sure about HTML 6 (if that ever comes), but I think it will. But it's really useless to think about it right now, since in 2130 the same browsers must still work and the nowadays website must still be available for anyone then. You can always change it later using javascript or something.

Time Machine
XMTML 2.0 seems to be doing friends with the Dodo, even before it got off the ground http://www.webmonkey.com/blog/XHTML_2_Dies_a_Lonely_Death__Makes_Room_For_HTML_5
voyager
A: 

if they become deprecated, the name "HTML" as is (hypertext markup language) would become senseless. as it wouldn't be the html-code marking some text as bold but it would be the CSS.

in my opinion: no, they don't get deprecated too soon...

regards

Atmocreations
That is what `<strong>` and `<em>` are for. You don't say *this is bold*, but rather you say *this is emphasized*
voyager
So any markup language in which you can't specify that text is to be set in bold type is senseless? That seems pretty senseless to me.
Chuck
@Chuck: not any. html. bold was an example. well in fact you may see it how you want it. one way is to say we mark up the format (example bold, italic) or we mark up the logical content of a document (example em, etc). guess it's a question of the definition of the abbreviation "html".in my opinion i think it's not good to deprecate formatting tags.
Atmocreations
@voyager: Shouldn't that be "this is italicized" rather than "this is bold" for "this is emphasized"?
trinithis
+1  A: 

Great question, and I'd suggest that:

YES, they SHOULD be deprecated. They're a styling tag, and add no content.

No, they WON'T be deprecated because they're so ingrained that it'd be a nightmare to take out.

That said, very likely that all browsers would continue to support the <b> and <i> tags.

p.campbell
+34  A: 

If you end up doing <span class="bold"> a lot you are not correctly using either span, nor class names. Class names should tell you what the tag is, not what it looks like.

The correct replacement for <b> and <i> are <strong> and <em>, and they should be used to note that the specific text inside has a different meaning than the surrounding text.

voyager
+1 for bringing up markup relating to meaning instead of presentation.
Andrew Coleson
<strong> is only a replacement for <b> where the author intends emphasis of a section of text, and <em> only a replacement for <i> when indicating where the stress in a sentence lies. For other purposes, such as employing typographical conventions like italicising a ship's name, using those tags would be completely wrong. HTML 5 encourages <i> for ship's names and the like. If the text is being made bold or italic for purely presentation reasons, (and we all like to make our web sites look nice) <span> with appropriate categorizations in the class attribute is the correct form.
Alohci
Actually, when I say <span> is the correct form, I mean use <span> or <div> in the absence of a more semantic element in the specific context of the text on the page. What matters is the categorization, which can then be styled with CSS.
Alohci
@Alohci: I agree with you that, when lacking a semantic element, you should use `<span>` or `<div>`, but generally they are overabused, and used in place of perfectly semantic tags.
voyager
+1  A: 

I doubt very much whether browsers would drop support for them. However, if the W3C validater raises an error for pages utilising them then I feel, over time, there use will depreciate. It takes time, but people do change habits - look at the once ubiquitous FONT tag, for instance.

Dan Diplo
This might be because there are obviously better ways of doing things than the font tag - CSS works so well now you don't need the font tag any more. However, using <strong> has no advantages of <b>, so <b> will probably stick around longer.
Colen
The fact that `<font>` is used less and less each day, doesn't mean that we don't see things like `<span class="italics">My text is <span class="bold">great!</span></span>`, that is equally nefarious. Not everyone on the internet *gets CSS*. As a matter of fact, a great percentage of the web has been made with **MS Word**.
voyager
+2  A: 

Don't forget the IE-6 browser folks!!
This browser has partly problems with the <strong> tag when it is used inside the caption of an <a></a> tag.
example:
<a><strong>Hello</strong></a>
The IE-6 creates a linebreak at the screen before the opening <strong> tag and after the closing </strong> tag. Not so by using the <b>(bold) tag instead. Everything is shown correctly then.

regards, Matthias

Matthias
+6  A: 

b and i have no semantical meaning. If you want just bold text, use b, but any other cases you should use strong and em

erenon
Yeah, but "Are “<i>” and “<b>” tags actually deprecated?" I'd assume HTML 4 since 5 isn't ready yet.
Bratch
They are not depracated but not recommended to use as semantical tags.
erenon
+6  A: 

According to http://www.w3.org/TR/html401/index/elements.html they are not currently deprecated.

Mark Pim
According to HTML 4, which has been relatively surpassed by XHTML...
The Wicked Flea
It also has relatively NOT been surpassed. For example, see the work on HTML5.
Roger Pate
Note that XHTML only defines a syntax and refers to HTML4 for semantics.
Ms2ger
A: 

<b> and <i> are not structural or semantic elements. You want your HTML to be semantic/structural and your CSS to contain the styling.

See here or here

Ron Gejman
+1  A: 
  1. They are non-semantic, and tread on CSS' toes.
  2. No, too many people like quick, dirty methods too much.
David Dorward
+6  A: 

No. <i> and <b> are not deprecated, at least not in HTML 4. One situation in which they may apply would be a list of references. For example, in Germany references are given in the following way:

Author: Title. Publisher, Year, ...

In this case the title is defined to be italic. It's no special emphasis (as would be signified by the <em> tag) but really italic.

ETA: And yes, you should use the <cite> element as well. But my point still stands:

<cite>Author: <i>Title.</i> ...</cite>

Wikipedia also uses both tags extensively, last time I looked.

Joey
No, in that case the appropriate element would be cite.
David Dorward
... which still doesn't ensure that it renders correctly. Sure, an in-line reference to some source would be a good use for `cite`, a single reference in a reference list as well. But for making a substring italic *within* the citation? Correct me if I'm wrong, but last time I looked, not even CSS letz me do that. Remember that it's only the title which gets italicized.
Joey
No, the correct code would be Author: <cite>Title.</cite> ...
Ms2ger
A: 

You can see it as tags which have "by coincidence" the same default styles as <b> and <i>. You should not see it as an exact replacement of <b> and <i>, but you should use it whenever the content has actually a semantically strong or emphasized meaning. You're however free to style it further to your taste.

BalusC
+29  A: 

they are not deprecated in HTML 4.01, and they won't be deprecated in HTML 5. for reasons:

The inclusion of these elements is a largely pragmatic decision based upon their widespread usage, and their usefulness for use cases which are not covered by more specific elements.

While there are a number of common use cases for italics which are covered by more specific elements, such as emphasis (em), citations (cite), definitions (dfn) and variables (var), there are many other use cases which are not covered well by these elements. For example, a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, or a ship name.

Similarly, although a number of common use cases for bold text are also covered by more specific elements such as strong emphasis (strong), headings (h1-h6) or table headers (th); there are others which are not, such as key words in a document abstract or product names in a review.

Some people argue that in such cases, the span element should be used with an appropriate class name and associated stylesheet. However, the b and i elements provide for a reasonable fallback styling in environments that don't support stylesheets or which do not render visually, such as screen readers, and they also provide some indication that the text is somehow distinct from its surrounding content.

In essence, they convey distinct, though non-specific, semantics, which are to be determined by the reader in the context of their use. In other words, although they don’t convey specific semantics by themselves, they indicate that that the content is somehow distinct from its surroundings and leaves the interpretation of the semantics up to the reader.

This is further explained in the article The <b> and <i> Elements.

Similarly, the small element is defined for content that is commonly typographically rendered in small print, and which often referred to as fine print. This could include copyright statements, disclaimers and other legal text commonly found at the end of a document.

ax
This is exactly what I wanted to know. A lot of good answers, this is the best. Thanks to everyone for responding.
evolve
This answer is really good.
erenon