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

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

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 30 Nov 2006 22:09:50 -0800
Message-ID: <004e01c7150f$4f9bc5d0$0901a8c0@TERRA>

----- Original Message ----- 
From: "Boris Zbarsky" <bzbarsky@mit.edu>
To: "Andrew Fedoniouk" <news at terrainformatica.com>
Cc: <whatwg at lists.whatwg.org>
Sent: Thursday, November 30, 2006 9:26 PM
Subject: Re: [whatwg] HTML syntax: shortcuts for 'id' and 'class' attributes


> Andrew Fedoniouk wrote:
>> So if  HTML5 will allow following:
>>
>> <p.myclass> ... </p>
>> together with its full and equivalent form
>> <p class="myclass"> ... </p>
>>
>> then this will be backward compatible solution as
>> HTML5UA will understand both forms - classic and simplified.
>> Am I right?
>
> No, because an HTML4 UA will not render that in any sort of reasonable way 
> (for example, in an HTML4 UA the "p.myclass" tag will never be closed).

Boris, what about this then:

<p .myclass> ... </p>
<p #myid> ... </p>

(tag name and attribute delimeted by space)

Can this be considered as enough backward compatible ?

<ot>
   Ruby is a JavaScript covered by thick layer of syntax sugar.
   I am trying to analyze Ruby fenomena in respect of HTML5.
   Probably such "sweet" syntax features will help to popularize HTML5 even 
more?
</ot>

<ot>
   In my personal opinion HTML4 is not perfect but good enough for the needs 
of
   Web Applications. It is CSS and scripting model that failed to provide 
even basic
   functionality modern web application require. It is enough to take a look 
on what
   people are doing with AJAX and outskirts currently.
   HTML per se is not a bottleneck I would say.
</ot>

Andrew. 
Received on Thursday, 30 November 2006 22:09:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:30 UTC