tags:

views:

106

answers:

4

As we are moving on to HTML5, there are some tags which now hold a very least importance that it did in the past.For example <dl> the defination list, I dont remember the last time used this tag.

And not only this, but there are tags which have a better and more efficient versions or just clear redundancy like <strong> and <b>, <basefont> and <font> etc.

In your Opinion, which are the tags that as a developer you can live out with?, and Which are the tags which can be ignored? because we have a better version.

A: 

STRONG and B have distinct semantic meaning now. There was a lot of effort to clean up semantically-ambiguous elements like that. Even HR got some attention.

I use DL all the time, personally. It my workhorse KeyValuePair type. I sometimes find myself wishing it had more rigorous semantics, but then other times I'm thankful for its flexibility in allowing me to define its semantics contextually.

I suppose it depends on your definition of 'useless', which I take to mean 'having no practical use whatsoever'. I don't really know of any element in HTML5 I could say that I'll never use under any circumstances.

Superstringcheese
+1  A: 

It was suggested I make this an answer, so here is an excellent page that discusses which tags and attributes should be avoided in HTML5 pages, and why, though he doesn't include elements like the blink tag.

http://www.html-5.com/avoid/

James Black
It's also out of date in at least one respect. The accesskey attribute is not deprecated in HTML5. (http://dev.w3.org/html5/spec/elements.html#global-attributes)
Alohci
I expect that he was going by XHTML 2 which deprecated accesskey, but HTML5 continues to support it. Also, the page was an example of what might be useful as a nice list. I focus more on elements that should be avoided than attributes anyway, as the elements help drive how I can achieve my vision on a page.
James Black
A: 

I think that anything that indicates something that should be done in CSS is probably something that should be avoided. This includes

<b>,<strong>
<i>,<em>
<center>
<u>,<strike>

My least favourite has be to <font>, as it has absoutely no meaning, and should, in all instances be replaced with a tag.

Personally, I think it's also good to avoid HTML attributes that should be done with CSS such as "color" and "border".

Kibbee
+1 for 'anything that indicates something that should be done in CSS', -1 for strong and em as these are not entirely presentational.
BoltClock
They are not at all presentational. Like most people, the poster is unaware that tags like EM and STRONG have semantic meaning. Many modern browsers apply presentational effects to these tags unless they are overridden by CSS, but that doesn't make the tags themselves presentational.
Superstringcheese
+3  A: 

B and STRONG are not the same thing, and neither are I and EM.

EM means that the text shoud be emphasised. This thus says something about how the text should be interpreted, and this is understood by screen-readers (text-to-speach), etc. It has a logical meaning. I, on the other hand, says nothing about the semantics -- it simply tells the HTML renderer to render the text in italic. Hence, in text, to make an emphasis, use EM. If you for some reason need a bit of text to be in italic without this implying that the text should be emphasised, then you can use I.

The same things applies to STRONG and B.

However, I really dislike FONT, because it says nothing about the semantics. Use Hn for headers, EM for emphasis, CODE for code, etc. If you lack some tag for some context, define a CSS rule like

  <p class="footer">...</p>

or

  <p>This is <strong class="extraordinaryEmphasis">extremely</strong> important.</p>
Andreas Rejbrand