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

[whatwg] New attributes would degrade better than new elements

From: Ashley Sheridan <ash@ashleysheridan.co.uk>
Date: Wed, 26 Oct 2011 22:14:49 +0100
Message-ID: <1319663689.2604.9.camel@localhost.localdomain>
On Thu, 2011-10-27 at 04:14 +0800, Kang-Hao (Kenny) Lu wrote:

> (11/10/27 3:38), Jukka K. Korpela wrote:
> > Nobody needs new elements with no required functionality, really. The
> > idea of more compact markup is pointless. 
> 
> Every time I ask myself what the use cases of the semantic elements are,
> my only answer is "it makes existing markup shorter".

Think about what semantic means. In this context, it's about the meaning
of the tag to give a context to its contents. A user agent (not the same
thing as a browser) doesn't know what <div id="nav"> is, but the modern
ones do know what <nav> is, and what it means. You might not be able to
see the use case, but trust me, plenty of other people do, including
those behind things like search engines.

> 
> What else use cases do they serve? (This is a serious question since I
> truly don't know.)
> 
> (11/10/27 3:38), Jukka K. Korpela wrote:
> > People don't read or write markup that much,
> 
> I doubt it.

The reason for the new semantic tags is because of an effort to look at
what were common elements of pre-HTML5 pages and try to identify parts
of a web page that were most common. This led to things like <header>,
<footer>, <nav>, <section> and <article> being created and adopted by
the modern browsers and user agents. If we didn't have them, we'd be
back to using <div>s everywhere, with a mixed assortment of classes and
id's used to style them, and to hell with any search engines that tried
to understand our web pages.

For the same reason that it's better to mark up our text with <strong>
than <b> it's also better to mark up our pages using the new tags as
they give a meaning to areas of our pages that we want. If you don't
care about search engines or blind visitors, then don't bother using
them.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk
Received on Wednesday, 26 October 2011 14:14:49 UTC

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