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

On Wed, 30 Jul 2008 13:50:18 +0200, Ian Hickson <ian at hixie.ch> wrote:

> Every now and then, the issue of a global href="" attribute for all
> elements comes up. There are many valid use cases for this, like being
> able to make all cells in a table row act like a link, or making a banner
> ad act like a single block of a link.
>
> Unfortunately, I've been told over and over by implementers that a global
> href="" is a bad idea, and at the end of the day, the implementors are  
> the
> ones who have the final say, so that's just a non-starter.
>
> There are also alternative suggestions, like making <a> contain any
> element. Unfortunately, none of these end up working (e.g. for this
> proposal, <a><p></a> would create an unexpected DOM -- we'd have to make
> </p> end tags not optional when the next end tag was an </a>, which would
> be somewhat confusing).

The rules for optional end tags are already pretty confusing. I don't  
think it's a problem to require </p> when the "p" element is the last  
child of an "a" element.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 30 July 2008 06:11:30 UTC