Re: Need chapter and verse on quoting of attribute values

Jennifer Masek wrote:
> Does this mean that if an attribute value contains a "/" or a "#" that it
> must, under the 3.2 specification, be quoted?


> So, under 3.2, the first of the following pair would get quoted and the
> second wouldn't?


> <A HREF="#Rodents1">Hamsters</A>
> <H2><A NAME=Rodents1>Hamsters</A></H2>

Both *could* be quoted. The first *must* be quoted. I encourage authors
to just quote everything.

> 2)
> I cannot find an equivalent statement in the RFC 1866, though I am told
> that there is one that governs the quoting of attribute values for HTML
> 2.0 compliance. (I've even gone back to the SGML handbooks for a source
> description and archives of this list back to early 95!)

Yes, this is described in the SGML Handbook: page 331. An attribute
value specification can be either an attribute value (e.g abc) or an
attribute value literal ("abc"). The next production demonstrates that
an attribute value literal has quote around it.
 Paul Prescod

Received on Wednesday, 14 May 1997 18:53:04 UTC