DEV Community

[Comment from a deleted post]
Collapse
 
jaguart profile image
Jeff

I mostly agree with you.

I think there is an even higher zeroth law for HTML goodness, which is something like:

Always use accurate SEMANTIC HTML wherever possible

This article explains it better than I can: w3schools.com/html/html5_semantic_...

When we do our HTML code reviews, we count the non-semantic tags like <span> - they are are considered a code-smell - that indicates something might be going wrong...

Semantic-HTML is good for the soul. Namaste.

 
melnik909 profile image
Stas Melnikov

The span is the same semantic element like other

 
jaguart profile image
Jeff • Edited

No its not :-)

Check the w3schools intro to semantics - right at the top, around the 3rd line...

Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.

is a non-semantic element.

 
melnik909 profile image
Stas Melnikov

The fact that you say the span isn't semantic element is the span is semantic element because if it don't have semantic (meaning) you can't do it. And just read specs