[whatwg] Make quoted attributes a conformance criteria
Kornel
kornel at geekhood.net
Thu Jul 23 06:32:09 PDT 2009
On 23 Jul 2009, at 13:35, Keryx Web wrote:
> I'd say it is safe to say that using quotation marks for attribute
> values, always, except perhaps for collapsed, boolean attributes,
> has been regarded as best practice for a long time now. Speaking as
> an instructor for newbies, enforcing quotation marks has proven its
> value countless of times for me and my students.
It's not a clear benefit. Unpaired quotation marks can also be a
*source* of errors, which wouldn't happen without them:
<a href="http://example.com class="test">
> I'd say that all of my colleagues in WaSP EduTF would agree on that.
> Others share that sentiment too: http://twitter.com/burningbird/status/2765482250
I disagree about making it a conformace criterion. This is not
required to get text/html documents parsed reliably and unambiguously.
I wouldn't mind much if specification used more quotes in examples,
however I'm afraid that taking this to the extreme could give false
impression that unquoted attributes are an error, and spec would fail
to illustrate when quotes are necessary and when they're perfectly
safe to omit.
> Add:
> In order to avoid errors and increase readability, using quotes is
> highly recommended for all non-omitted attribute values.
To me min=0 is more readable than min="0". This is a matter of
opinion, and IMHO spec should not enforce one's coding style.
--
regards, Kornel
More information about the whatwg
mailing list