UBB.Dev
Posted By: Dave_L Single quotes, double quotes - 06/06/2002 2:34 PM
A question for you XHTML-compliance fanatics laugh

Does it matter whether single quotes or double quotes are used for attribute values within tags?

[code][/code]
Posted By: Idle Re: Single quotes, double quotes - 06/06/2002 3:02 PM
In every XHTML reference I've read they use "double quotes".
Don't know if it matters though.
Posted By: Matt Jacob Re: Single quotes, double quotes - 06/07/2002 1:22 AM
[code][/code]
Posted By: Dave_L Re: Single quotes, double quotes - 06/07/2002 4:34 PM
Thanks smile
Posted By: AllenAyres Re: Single quotes, double quotes - 10/05/2002 8:31 AM
if you are using them in code such as php, single quotes won't throw errors and you don't have to escapte them as with double-quotes smile
Posted By: Matt Jacob Re: Single quotes, double quotes - 10/06/2002 11:44 PM
Quote
quote:
Originally posted by AllenAyres:
if you are using them in code such as php, single quotes won't throw errors and you don't have to escapte them as with double-quotes smile
I would still use double over single quotes. Consider the following example:
code:
[qb]
Code
<?php
echo '<img src="this.gif" alt="something" />
';
echo "<a href="#" onclick="return confirm('Are you sure?\nThis action can\'t be undone!');">delete</a>";
?>
[/qb]
Posted By: Dave_L Re: Single quotes, double quotes - 10/06/2002 11:56 PM
That's the kind of example that proves that all programmers are insane. tipsy
Posted By: Matt Jacob Re: Single quotes, double quotes - 10/07/2002 8:16 AM
Well, of course, but that's a given. Err, I mean that's a givenn... wink
© UBB.Developers