Re: [whatwg] HTML syntax: shortcuts for 'id' and 'class' attributes

On Thu, 30 Nov 2006, Andrew Fedoniouk wrote:
> 
> While we are on the subject of discussing HTML syntax....
> 
> How about following (wild) idea?
> 
> To allow following notation (borrowed from CSS selectors):
> 
> <p.myclass>...</p> is equivalent of 
> <p class="myclass">...</p> 
> 
> <p#myid>...</p> is equivalent of 
> <p id="myid">...</p> 
> 
> <p.myclass1.myclass2>...</p> is equivalent of 
> <p class="myclass1 myclass2">...</p> 
> 
> <p#myid.myclass1.myclass2>...</p> is equivalent of 
> <p id="myid" class="myclass1 myclass2">...</p> 
> 
> It is syntax sugar of course but at least it will reduce amount of data 
> needs to be sent over the wire.

Unfortuntely that wouldn't be backwards compatible, and so isn't really an 
option.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 1 December 2006 03:27:48 UTC