On Saturday 28 October 2006 18:15, Robert Cummings wrote:

> >    As far as I can tell, single and double quotes
> > are interchangeable (but unmixable) in both HTML
> > and XHTML. When did single quotes go bad?
>
> Hmmm, I've been under the impression for quite some time that single
> quotes are somehow inferior to double quotes, but having just checked
> through both the XHTML and XML standard I couldn't find anything that
> supports that stance :/
>
> Cheers,
> Rob.

I've been using single quoted (X)HTML attributes for some time now without 
trouble.  The only catch is when you're dynamically building a DOM 1 
attribute like onclick, as the Javascript inside will almost invariably have 
a quotation mark in there somewhere, which by convention is single-quoted and 
the HTML double quoted.  Of course, you should be using DOM 2 event handlers 
anyway, but that's beside the point... :-)

It surprised me, too, when I realized single quotes were kosher (X)HTML, but 
it can be quite convenient.

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to