Re: Need chapter and verse on quoting of attribute values

In article <v03010d0faf9ff30c7c41@[134.79.129.58]>,
Jennifer Masek <jmasek@SLAC.Stanford.EDU> wrote:
> I'm searching for chapter and verse on the quoting of attribute values
> under HTML spec. 2.0 and 3.2.  I've got 2 main questions:

The HTML 2.0 spec discusses quoting attribute values in section 3.2.4:

   The value of the attribute may be either:

        * A string literal, delimited by single quotes or double
        quotes and not containing any occurrences of the delimiting
        character.

        * A name token (a sequence of letters, digits, periods, or
        hyphens). Name tokens are not case sensitive.

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

Yes. HTML 3.2 basically says in words what HTML 2.0 defined more
formally: something with those characters in it is a 'string literal'
and those must 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>

You *may* quote the latter, but you *must* quote the former.

-- 
E-mail: galactus@htmlhelp.com .................... PGP Key: 512/63B0E665
Maintainer of WDG's HTML reference: <http://www.htmlhelp.com/reference/>

Received on Thursday, 15 May 1997 17:08:33 UTC