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

Paweł Stradomski pstradomski at gmail.com
Thu Feb 28 11:44:29 PST 2008


W liście Robert O'Rourke z dnia czwartek 28 lutego 2008:
> Paweł Stradomski wrote:
> <div class="steps">
> 	<input href="/basket.html" class="basket-step" value="Basket" />
> 	<input href="/checkout.html" class="current checkout-step"
> value="Checkout" /> <input type="submit" class="confirm-step"
> value="Confirm" />
> 	<input type="button" disabled="disabled" class="payment-step"
> value="Payment" /> </div>
>
>
> If I could use one (or at least fewer types) of elements it would make
> cross-browser styling easier. 
You're breaking element semantics here. <input>s are for form input elements - 
text fields, checboxes etc. The above would make those inputs text fields, as 
you didn't spcify the type. Now how can an input be a link? It's supposed to 
accept user text, not to point to some other resource. Activating an input 
(by clicking on it etc.) should just make it start accepting typed text, not 
make the browser jump somewhere else.

Presentation/style should follow the semantics, not the other way round.

After more thinking I lean towards Krzysztof's point of view, href as global 
attribute is a bad idea. I guess it's in the FAQ for a purpose, so EOT for me 
(of course I'll accept and respond to off-list e-mails).

-- 
Paweł Stradomski



More information about the whatwg mailing list