W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2001

should attribute values be limited by \" or \'?

From: Daniel Gomes <dcgomes@xldb.fc.ul.pt>
Date: Wed, 27 Jun 2001 16:27:01 -0400 (EDT)
Message-ID: <012701c0ff48$218bc470$0502a8c0@piupiu>
To: <html-tidy@w3.org>
Hello!

In HTML 4, is it correct to use both \' or \" to delimit attribute values? 

As I looked in the specification, it doesn't seem so, for instance we have in the img specification:

<!ELEMENT IMG - O EMPTY                -- Embedded image -->
<!ATTLIST IMG
  %attrs;                              -- %coreattrs, %i18n, %events --
  src         %URI;          #REQUIRED -- URI of image to embed --
...

<!ENTITY % URI "CDATA"
    -- a Uniform Resource Identifier,
       see [URI]


so it seems that 

<img src= "someimage.gif" >

is correct but

<img src= 'someimage.gif' >

isn't.

All examples I found in the tutorials have \" , however the W3C validator and Tidy consider that \' is correct.

Am I doing a dumm interpretation of the HTML specification? Could you please help me.

Thanks...

/Daniel Gomes
Grupo xldb-LaSIGE
Received on Friday, 29 June 2001 12:47:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:45 GMT