W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] Proposal for a link attribute to replace <a href>

From: Markus Ernst <derernst@gmx.ch>
Date: Wed, 27 Feb 2008 14:43:10 +0100
Message-ID: <47C568EE.6060309@gmx.ch>
Shannon schrieb:
> With the capabilities of modern browsers it seems to me that a specific 
> tag for hyperlinks is no longer required or useful and could be 
> depreciated with a more versatile global "link" attribute. I believe 
> that hyperlinks now have more in common with attributes such as ONCLICK 
> than they do with tags since in web applications links often define 
> actions rather than simply being a part of the document structure. The 
> <A> tag would continue its role as an anchor but the HREF attribute 
> would be phased out making <A> a more consistent element (since links 
> and anchors are really quite separate concepts). Below is an example of 
> the proposed link attribute in action:
> 
> <li><a href="foo.html">Foo</a></li>
> 
> could be written as:
> 
> <li link="foo.html">Foo</li>
> 
> No useful semantic information is lost however the markup is cleaner and 
> the DOM drops an unnecessary node (which could speed up certain 
> applications).

I like this idea - this could significantly reduce the amount of 
scripting in web pages and applications, and thus increase the 
accessibility of hyperlinks.

Anyway, why do you suggest a new attribute rather than making the 
existing href attribute global?

<li href="foo.html">Foo</li>

That makes your idea backwards compatible - provided UAs interpret 
attributes of unknown tags, they will even be capable to correctly 
handle occurrences of <a href> when the A element will be totally 
removed from their code.

-- 
Markus Ernst
Received on Wednesday, 27 February 2008 05:43:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC