[whatwg] New attributes would degrade better than new elements
Ashley Sheridan
ash at ashleysheridan.co.uk
Wed Oct 26 14:14:49 PDT 2011
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
More information about the whatwg
mailing list