Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why HTML 5 still have support for Presentational elements?

See list here:

http://www.w3schools.com/html5/html5_reference.asp

like <b> , <i>, <br>, <hr>, <small>?

Is it means no cons to use these? But what about content and presentation seperation?

like image 216
Jitendra Vyas Avatar asked Feb 10 '10 08:02

Jitendra Vyas


2 Answers

Two reasons come to mind:

  1. Because some people (not me, here is a primer about this opinion and here are the WHATWG FAQ about this) don't think of them as presentational. They argue, that <b> has semantics of its own, for example, where <strong> is not right and the text should be bold anyways (IMHO therefore we have <span>)

  2. Because HTML5 has a pragmatic and backwards compatible approach: What worked in HTML4 should work too in HTML5. They argue, that this is why XHTML2 died.

like image 187
Boldewyn Avatar answered Oct 13 '22 10:10

Boldewyn


First have a look what WHATWG says about it (this is also mentioned in the answer to the related question cited above).

It is said (as I thought, too) that <strong> and <em> provide an emphasis when using a screen reader, but according to this article by Harry Roberts, it turns out that in practice screen readers don't accentuate text marked this way.

And last, read the spec about <b> (it's already mentioned in the FAQ in the first link, above):

The b element represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened.

and <i>:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.

Likewise, have a look at <small>, <hr> and <br> (there are examples there, too.)

like image 41
Marcel Korpel Avatar answered Oct 13 '22 12:10

Marcel Korpel