|
Posted by Stephen Poley on 11/07/05 10:24
On Mon, 07 Nov 2005 07:27:04 GMT, Patient Guy
<Patient.Guy@nowhere.to.be.found.com> wrote:
>While the values of 'id' and 'name' attributes include restrictions on the
>use of characters such as beginning with a letter, the values of the
>'class' attribute define no restriction as I can find.
>
>Thus the use of:
>
> class="thumbedImage 0.4"
>
>is permitted, and could be used as an attribute in IMG elements to identify
>images whose sizes I want to change dynamically with the loading of the
>document body through a script function call, as the "onload" attribute is
>not allowed for IMG elements in the specification.
....
>Is there anyone whose understanding of the specification differs from this
>understanding?
Well, I couldn't immediately find something prohibiting that. However:
class="thumbedImage 0.4" assigns the classes "thumbedImage" and "0.4"
to the element.
In CSS, img.0.4 { ... } would refer to images having the class 0 and
the class 4.
In fact in CSS: "identifiers (including element names, classes, and IDs
in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646
characters 161 and higher, plus the hyphen (-); they cannot start with a
hyphen or a digit."
Even if you can use periods in HTML class-names, it seems to me that it
would be inadvisable.
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
Navigation:
[Reply to this message]
|