What do you think are useless tags in HTML?

When we move on to HTML5, there are tags that currently have the least meaning that they have done in the past. For example, the <dl> protection list, I don’t remember the last time I used this tag.

And not only that, but there are tags that have better and more efficient versions or just clear redundancies, such as <strong> and <b> , <basefont> and <font> , etc.

In your opinion, which are tags that, as a developer, can you live together ?, and which are tags that can be ignored? because we have the best version.

+4
source share
6 answers

I was asked to answer this question, so here is a great page that discusses which tags and attributes to avoid on HTML5 pages, and why, although it doesn't include elements like the blink tag.

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

+3
source

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

EM means the text is underlined. Thus, this speaks of how the text should be interpreted, and this is understood by screen readers (text-to-speech), etc. This has a logical meaning. I , on the other hand, says nothing about semantics - it simply tells the HTML visualizer to render the text in italics. Therefore, in the text, to emphasize, use EM . If for some reason you need some text to be italicized without it, implying that the text should be highlighted, then you can use I

The same applies to STRONG and B

However, I really dislike FONT because it says nothing about semantics. Use Hn for headers, EM for highlighting, CODE for code, etc. If you are missing a tag for some context, define a CSS rule, for example

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

or

  <p>This is <strong class="extraordinaryEmphasis">extremely</strong> important.</p> 
+5
source

STRONG and B now have semantic meaning. There was a lot of effort to clear the semantically ambiguous elements. Even HR got some attention.

I use DL all the time, personally. This is my KeyValuePair workhorse. Sometimes I find myself wanting him to have more rigorous semantics, but in other cases I am grateful for her flexibility, which allows me to contextually define her semantics.

I suppose it depends on your definition of "worthless", which I mean "no practical use." I don’t know a single element in HTML5, I would say that I will never use it under any circumstances.

+1
source

P should be discarded. No kidding. This creates artificial breaks in the text that are best reproduced with line breaks. Is there a P tag on a typewriter? It follows that it becomes a “text container” on which we have become addicted, for no good reason. A paragraph is only a stylistic flow marker. In the best case, this should be a singleton tag. In CSS, I use it simply as a container for the text area, a designation that is similar to SPAN, except for the block form. P really should be a TEXTSPAN tag, which can be a parent for several intervals, but not for itself. We often have to store some P representation in databases, which then cannot be restored for display. Again, a double line break is much more attractive and versatile.

:-)

0
source

<code> is useless. If maybe you are not one perl one-liner fan. It should have been a semantic way to create a <pre> block - that would be useful.

<insert code> is useless. It is redundant for <object> and less capable than <object>

<little> useless. It has no semantic meaning and must be done using CSS.

These are my opinions on the three most useless tags that made it into the HTML5 specification.

0
source

I think that everything that points to something that should be done in CSS should probably be avoided. This includes

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

My least favorite is <font> , because it is absurdly meaningless and should in all cases be replaced with a tag.

Personally, I find it also useful to avoid HTML attributes that must be executed using CSS, such as color and border.

-2
source

All Articles