0

So with these 6 tags, there are no visible differences and I know 3 are deprecated.

+––––––––––––––––––––––––––+––––––––––––––––––––––––––––––––+
|                          |                                |
|            i             |             em                 |
|                          |                                |
+–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
|                          |                                |
|            b             |            strong              |
|                          |                                |
+–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
|                          |                                |
|            s             |             del                |
|                          |                                |
+––––––––––––––––––––––––––+––––––––––––––––––––––––––––––––+

As of now, <i>, <b> and <s> are all deprecated however I have seen posts and sites saying use these instead of <em>, <strong>, and <del>

There is also the CSS methods of font-style:italic, font-weight:bold and text-decoration:line-through.

Should we still be using the HTML tags at all or completely move on to CSS? If we were to continue using the HTML tags. Which ones would we use?

Spedwards
  • 4,167
  • 16
  • 49
  • 106
  • 1
    You should continue using the non-deprecated elements semantically, as you see fit and according to general use and standards established by other developers. – John Mar 29 '14 at 13:52
  • @JohnTobin Though which ones are deprecated. I've seen sites say the left column is deprecated and sites saying the right coloumn is deprecated. Until today, I never even knew `del` and `s` existed either. – Spedwards Mar 29 '14 at 13:54
  • 1
    Read this: http://html5doctor.com/i-b-em-strong-element/ – powerbuoy Mar 29 '14 at 13:59
  • 1
    http://www.w3.org/TR/html5/introduction.html#presentational-markup – Gordon Mar 29 '14 at 14:00
  • That’s not at all “opinion based”. There’s a very clear answer to that, and your link actually answers parts of it, @Gordon (powerbuoy’s link contributes the other half of the answer). – Konrad Rudolph Mar 29 '14 at 14:04
  • @KonradRudolph I am reopening it, but right now there is two answers. One says, they are deprecated. the other says, they are not. Both have two upvotes. That's exactly what the close reason is for. If the answer is very clear, there should not be two competing answers. – Gordon Mar 29 '14 at 14:09
  • @Gordon There often are, one of them is wrong (or, slightly imprecise and outdated) while the other presents the more recent view of the community / committee, and is thus the (currently) correct one. – Konrad Rudolph Mar 29 '14 at 14:11
  • @KonradRudolph the wrong/imprecise/outdated should be downvoted in that case, especially since this is a brand new question. – Gordon Mar 29 '14 at 14:12
  • 1
    the s vs del part [has been asked before too](http://stackoverflow.com/questions/16743581/difference-between-s-and-del-in-html-and-whether-they-affect-website-rankin) – Chris Wesseling Mar 29 '14 at 14:13

3 Answers3

4

Tags are no longer deprecated, semantic use recommended

You can use all 6 tags semantically. That is: Use them to markup parts of the text according to its meaning. Read more about this in the specs:

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.3 The del element:

The del element represents a removal from the document.

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 [...].

4.6.17 The s element:

The s element represents contents that are no longer accurate or no longer relevant.

The <b>, <i> and <s> tags are no longer deprecated in HTML5. But do not use the above tags only for the purpose of styling text in their particular manner.

Use CSS for styling purposes

Depending on the overall visual appearance of your page, it may be appropriate to style some other parts of the page similar to the default appearance of the text in those tags. This is where you can use the CSS properties.

amoebe
  • 4,857
  • 5
  • 37
  • 42
1

<em>, <strong> and <del> all carry meaning. They should be used when it is right to use them for that meaning.

<i>, <b> and <s> do not carry meaning, and are equivalent to <span style="font-style:italic"> etc.. This is why they are deprecated, but the semantic ones above are not.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • They are the same visually, on the back-end, are these processed any differently? Are `, , ` used mainly for screen-readers? – Spedwards Mar 29 '14 at 13:56
  • 2
    May I just add that `i` and `b` are in fact not deprecated: http://html5doctor.com/i-b-em-strong-element/ – powerbuoy Mar 29 '14 at 13:58
  • @Spedwards They may be visually the same *by default* but they can be styled independently, and often are. For instance, `` is often styled to be in a different colour or slightly bigger, rather than italic. Doing the same for ``, while possible, would be highly misleading. – Konrad Rudolph Mar 29 '14 at 14:00
0

The problem is that with the old tags (bold, italic and strike), the tag names implied on how it should be presented.

The new ones does not. Take del tag, for example. You can remove the strike and make it just red, and it's perfectly fine, because the name does not imply the text will be striked.

Ortiga
  • 8,455
  • 5
  • 42
  • 71