W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2009

Re: HTML 4.01: Erratium

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Tue, 07 Apr 2009 13:49:54 +0100
Message-ID: <49DB4BF2.8070907@googlemail.com>
To: Alexei Pshenichnyi <Alexei_Pshenichnyi@epam.com>
CC: "www-html-editor@w3.org" <www-html-editor@w3.org>
On 6/4/09 11:20, Alexei Pshenichnyi wrote:
> Hello, guys.
>
> I want to write about 3.2.2 Attributes
> <http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2> section of
> HTML 4.01 Specification.
>
> I am not sure whether it is wrong or not, but still…
>
> This section specify that the only legal characters for attribute values
> are “letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45),
> periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons
> (ASCII decimal 58)”, meanwhile later in specification I can see that
> value of some attributes (e.g. style) can contain semicolons (ASCII
> decimal 59).

The full quotation is "In certain cases, authors may specify the value 
of an attribute without any quotation marks. The attribute value may 
only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 
45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and 
colons (ASCII decimal 58). We recommend using quotation marks even when 
it is possible to eliminate them."

> So could you please clarify whether semicolon is a legal character or not?

Judging from the above:

If the attribute value is delimited with single or double quotation 
marks, semicolon is a legal character.

alt=";" is legal

If the attribute value is not delimited with single or double-quotation 
marks, semicolon is an illegal character.

alt=; is illegal

--
Benjamin Hawkes-Lewis
Received on Tuesday, 7 April 2009 12:50:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:59 GMT