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>

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 -->
  %attrs;                              -- %coreattrs, %i18n, %events --
  src         %URI;          #REQUIRED -- URI of image to embed --

    -- a Uniform Resource Identifier,
       see [URI]

so it seems that 

<img src= "someimage.gif" >

is correct but

<img src= 'someimage.gif' >


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.


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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:50 UTC