Forum Moderators: open

Message Too Old, No Replies

Single quotes allowed for attribute values?

By W3C standards are single-quotes allowed?

         

anjanesh

3:43 am on Dec 16, 2007 (gmt 0)

10+ Year Member



<input type="text" name="txt1" />

Are single-quotes allowed by W3C standards to wrap attribute values?
<input type='text' name='txt1' />

Thanks

tedster

3:52 am on Dec 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The W3C page "On SGML and HTML" has this answer (HTML is one example of SGML mark-up)

By default, SGML requires that all attribute values be delimited using either double
quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39).