[wp-hackers] XHTML Strict Mode

Eric A. Meyer eric at meyerweb.com
Wed Aug 18 15:36:28 UTC 2004


At 10:33 +0200 8/17/04, Brian Meidell wrote:

>Since inconsistent use of double and single quotes in a XHTML 
>document seems to pass right through the w3 validator, I figured the 
>XML and XHTML spec might differ in other points as well.

    Whatever XML defines is true for XHTML[1], because XHTML is XML. 
You can use either single quote or double quotes, but you can't leave 
quotes off of attribute values.  You also have to balance quotes; 
that is, if you open an attribute value with a double quote, it has 
to end with a double quote.  Similarly for single quotes.  I think 
those are the only rules regarding quotes on attribute values; 
they're the only ones I can remember offhand, anyway.


[1] Although not necessarily for browser implementations of XHTML support.

-- 
Eric A. Meyer  (eric at meyerweb.com)    http://www.meyerweb.com/eric/
Principal, Complex Spiral Consulting  http://www.complexspiral.com/
"CSS: The Definitive Guide," "CSS2.0 Programmer's Reference,"
"Eric Meyer on CSS," and more   http://www.meyerweb.com/eric/books/



More information about the hackers mailing list