10

I've read that <i> and <b> tags are advised against in favor of <strong> and <em> respectively. However I'm curious though, are these tags actually deprecated or is it simply good practice not to use them? I know that tags such as <u>, <font>, and <s> are actually deprecated by w3, however haven't seen any documentation about these two tags being deprecated.

If the tags are actually deprecated, could someone provide a link to the documentation which they are deprecated within?

If they are not deprecated:

  1. Why should they not be used in certain situations where <em> and <strong> might not apply?
    It would appear to me that <em> and <strong> are more suited for bodies of text which actually need to be treated different when interacted with by devices (such as screen readers), whereas <i> and <b> might be suited for use where you don't actually want the text to be treated different, simply appear different.
  2. Do you think that <i> and <b> might become deprecated in the future?
27 accepted

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.

6

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

6

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

6

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.

1

For situations when you are required to typographically format something (such as bibliographic references according to a specific manual of style) but must do so in HTML, they are appropriate.

Of course, in practice they may still behave the same in all respects, but you still:

  • can style them differently in CSS if you choose,
  • have represented semantically that the "meaning" of bold is intended, rather than emphasis.
0

<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

0
  1. They are non-semantic, and tread on CSS' toes.
  2. No, too many people like quick, dirty methods too much.
0

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.