Re: Attribute values

On 2012-08-14, at 12:45 PM, Liam R E Quin <liam@w3.org> wrote:

> On Tue, 2012-08-14 at 11:00 -0400, Murray Maloney wrote:
>> On 2012-08-14, at 10:50 AM, Uche Ogbuji <uche@ogbuji.net> wrote:
> 
>>> Unfortunately foo=bar syntax would break backward syntactical
>> compatibility
> 
>> I was thinking about HTML.
> 
> HTML also "allows"
> 
> <a href=http://www.w3.org/ style="color: red; font-size: 64pt;">W3C</a>

I don't see what is wrong with either example.  The href attribute value contains no spaces. That would have worked in SGML, not in XML, yes in HTML, so why not uXML?

> I don't think allowing people to omit the quotes on attribute values
> only if some non-HTML set of conditions is met will help HTML authors;
> it's simpler to require them.

I understand that I have to use " " when there are spaces involved, but not otherwise. Simple rule. Easy to remember.

Moreover, as you have illustrated, people do it.  And it works.

It's not that I am advocating against using quotes. I am just observing that it happens in the wild.

If empty elements make it easier for authors, then so do attribute values without quotes.  I'm just saying.

Murray

Received on Tuesday, 14 August 2012 17:00:02 UTC