W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

[whatwg] New attributes would degrade better than new elements

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 27 Oct 2011 02:37:23 +0300
Message-ID: <4EA899B3.4040800@cs.tut.fi>
27.10.2011 0:57, Ashley Sheridan wrote:

> If people are using versions of IE that old, then
> they deserve to have an older version of the "web" given to them.

That's rather elitistic, given the fact that many people have no way of 
upgrading their IE or switching to your preferred browser, and no need 
to do that apart from some ideas of "HMTL5".

> Why is adding attributes smoother?

Browsers recognize the elements.

> User agents still have to be modified
> to 'understand' an attribute to make the same semantic sense as a new
> tag

What semantic sense? Exactly what do "modern" browsers understand about 
<nav> for example? What are they required to "understand"? Just that 
there's a styleable element. But with <div>, that's something we have 
with all browsers.

The difference is between fancy new elements and good old elements with 
new attributes.

> If you're using an older version of IE then likely it's because you
> don't know any different

That's rather elitistic, isn't it? If we could discard all "bad" 
browsers, the world would be nicer, yes, but then we would not really 
have any browsers, would we?

> Attributes can be semantic, but where do you draw the line?

In the definition of the attributes. If you can make up a new element 
like <nav>, why can't you make up a new attribute like type=nav?

> Would you really favour using attributes to determing the meaning of a
> tag, or would you rather that HTML just follows its natural course and
> attributes be used to supplement a tag from default values?

Neither attributes nor tag names mean anything by themselves. They get 
their meanings from specifications or from browser practices.

The question is whether the new "semantic" tags have any useful impact 
(what might it be?). Inventing new tags may sound cooler than defining 
meanings for attributes, but it's just an idle game. Is there _any_ 
demonstrable use of, say, the semantics of <nav>? And what's the reason 
why that could not be achieved in the less disruptive way of assigning a 
standardized meaning to, say, the type attribute of <div>?

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 26 October 2011 16:37:23 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC