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.
Received on Friday, 1 December 2006 00:02:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:27 UTC