W3C home > Mailing lists > Public > www-html@w3.org > November 2008

Re: class="<valid chars here>"

From: Dustin Boyd <rpgfan3233@gmail.com>
Date: Thu, 20 Nov 2008 10:15:54 -0600
Message-ID: <ef7a0f3a0811200815r5c57d9eaq25c37045a9af4ffd@mail.gmail.com>
To: Tei <oscar.vives@gmail.com>, www-html@w3.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Nov 20, 2008 at 03:23, Tei  wrote:
> I have a question.
>
> Is that class values valid?
>
> class="my-system"
>
> class="my_system"
>
> class="my/System"
>
> class="oscar.vives@foo.bar"
>
> is class case-sensitive?
>
> class="ultraTile"
> class="ultratile"

Yes, those are all valid in HTML 4.01.  @class contains a
whitespace-separated list of CDATA items.  The definition of CDATA for
HTML 4.01 is as follows:

    CDATA is a sequence of characters from the document character set
and may include character entities. [1]

Unlike @id and @name, @class appears to be completely unrestricted in
HTML 4.01.  However, when using XHTML, you must remember that the
definition of CDATA is governed by XML.  The XML grammar specifies
that character data (CDATA) is specified by the following grammar
declaration:

    CharData ::= [^' [^'. [4]

I hope this helps!

RpgFan

[1] - http://www.w3.org/TR/html4/types.html#type-cdata
[2] - http://www.w3.org/TR/xml/#NT-CharData
[3] - http://www.w3.org/TR/xml/#dt-chardata
[4] - http://www.w3.org/TR/xml/#dt-cdsection

- --
Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the
ratification of C++0x, and the day that I can code without logic
troubles.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkkljKcACgkQXd35/YlIavfiKACeL6wX/eP9kGWKxhcIYuqxXHM6
EjMAn0PWS9av8lODvS+T7iVxrlrnUWSM
=a2St
-----END PGP SIGNATURE-----
Received on Thursday, 20 November 2008 16:16:29 GMT

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