It's nice to see pedantry validated, occasionally.<p>Still, this will invariably lead to a few arguments behind closed doors:<p>- "We should obviously standardize on single quotes, since they're shorter than double quotes and save more space!"<p>- "Our site serves up dozens of pageviews a day – let's spend the next week scrubbing our markup for consistency!"<p>- "If you're using mixed quotes in your markup, you're Doing It Wrong!"
So basically it comes down to insignificant performance and size boost. The reason for being able to mix them is so you don't need to escape quotes by using the alternative type.<p>I think consistency makes code look nicer and perhaps a bit more readable, but lets not kid ourselves that this leads to any meaningful improvements.
Most of my HTML is generated by Perl so I am the opposite. Alls string vars at the Perl level are wrapped in double quotes in case interpolation is necessary. Attributes are wrapped in single quotes so my Perl code doesn't contain a bunch of \" patterns scattered throughout.<p>I totally agree about consistency though; I even take the minor performance hit when interpolation is unnecessary by using double quotes anyway so that all uses of double and single quotes are consistent
I would view it as a "code smell" - if you aren't concerned about mixed single/double quote usage, then what ELSE aren't you concerned about?
The first thing that came to mind when reading the title of this post was Google Fonts. Maybe this is validation that I need to write that Chrome extension that comes to mind every time I'm copying that snippet.