W3C home > Mailing lists > Public > www-validator@w3.org > June 2001

should attribute values be delimited by \", \' or nothing ?

From: Daniel Gomes <dcgomes@xldb.fc.ul.pt>
Date: Thu, 28 Jun 2001 08:56:23 -0400 (EDT)
Message-ID: <018d01c0ffd2$542ca180$0502a8c0@piupiu>
To: <www-validator@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.

Plus the validator considered that all this cases are correct in HTML 4.01 strict, transitional and xhtml
 
<img alt='somedesc' src= 'someimage.gif' >
<img alt="somedesc" src= "someimage.gif" >
<img alt=somedescsrc= someimage.gif >


Am I doing a wrong interpretation of the HTML specification? Or the validator doesn't follow the specification?

Thanks...

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:58 GMT