W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

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

From: David Håsäther <hasather@gmail.com>
Date: Fri, 1 Dec 2006 01:19:04 +0100
Message-ID: <1a296f990611301619q42d1bc46w18f647fc2971490a@mail.gmail.com>
(Accidently only sent the first mail to Andrew).

On 12/1/06, Andrew Fedoniouk <news at terrainformatica.com> 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.

HTML5 is meant to be backwards compatible, so this is out of the question.

-- 
David H?s?ther
Received on Thursday, 30 November 2006 16:19:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:50 UTC