Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will the <b> and <i> tags ever become deprecated?

(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. :)

like image 207
Gordon Gustafson Avatar asked Aug 28 '09 18:08

Gordon Gustafson


People also ask

Is the B tag obsolete?

Styling information has been deprecated since HTML4, so the meaning of the <b> element has been changed. If there is no semantic purpose to using the <b> element, you should use the CSS font-weight property with the value "bold" instead in order to make text bold.

Is I tag deprecated?

In HTML5 i and b are no longer deprecated. Instead, they are given sematic meaning. So they are now actually about semantics, and not about presentation. As before, you use em to mark up emphasis: "The cat is mine." But you use i for almost all other cases where you would use italics in a printed work.

Which tags are no longer valid in HTML5?

Deprecated Attributes Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed completely. img and iframe. caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. table, tr, td, th and body.

What does it mean if a tag is deprecated?

Deprecated. A deprecated element or attribute is one that has been outdated by newer constructs. Deprecated elements are defined in the reference manual in appropriate locations, but are clearly marked as deprecated. Deprecated elements may become obsolete in future versions of HTML.


11 Answers

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.

Update: New specification for <b>, <i>,<strong>,<em> released under HTML 5

In HTML5 <b> and <i> have specific meaning as do <strong> and <em>. Use them all as specified.

4.6.2 The em element :

The em element represents stress emphasis of its contents.

4.6.3 The strong element:

The strong element represents strong importance, seriousness, or urgency for its contents.

4.6.16 The i element:

The i element represents [...] otherwise offset from the normal prose [...], such as a taxonomic designation, a technical term, [...].

4.6.17 The b element:

The b element represents a span of text to which attention is being drawn for utilitarian purposes [...], such as key words in a document abstract, product names in a review [...].

like image 95
Esteban Küber Avatar answered Oct 10 '22 11:10

Esteban Küber


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

The inclusion of those elements is a largely pragmatic decision based upon their widespread usage, and their utility for 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 keywords 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, the <i> and <b> elements 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, but instead they indicate that the content is somehow semantically distinct from its surroundings — leaving 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 is often referred to as "fine print"; that could include copyright statements, disclaimers and other legal text commonly found at the end of a document.

like image 39
ax. Avatar answered Oct 10 '22 11:10

ax.


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.

like image 26
Joey Avatar answered Oct 10 '22 11:10

Joey


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

like image 37
erenon Avatar answered Oct 10 '22 09:10

erenon


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

like image 35
Andrew Coleson Avatar answered Oct 10 '22 11:10

Andrew Coleson


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

like image 35
Mark Pim Avatar answered Oct 10 '22 11:10

Mark Pim


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.

like image 45
p.campbell Avatar answered Oct 10 '22 09:10

p.campbell


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

like image 42
Matthias Avatar answered Oct 10 '22 09:10

Matthias


  1. They are non-semantic, and tread on CSS' toes.
  2. No, too many people like quick, dirty methods too much.
like image 26
Quentin Avatar answered Oct 10 '22 11:10

Quentin


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.

like image 43
Dan Diplo Avatar answered Oct 10 '22 09:10

Dan Diplo


<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

like image 43
Ron Gejman Avatar answered Oct 10 '22 11:10

Ron Gejman