W3C home > Mailing lists > Public > www-style@w3.org > December 2006

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

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 30 Nov 2006 16:02:17 -0800
Message-ID: <002b01c714db$f71bb510$db02000a@internal.toppro.net>
To: <www-style@w3.org>

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.

Andrew Fedoniouk.
http://terrainformatica.com
 
Received on Friday, 1 December 2006 00:02:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:47 GMT