"Jeff Thies" <no****@nospam.net> wrote:
I seem to recall that either "-" or "_" at one time did not work
as some type of cdata, either classes or id's.
Technically class is CDATA in the DTD, but that's just because SGML
(not to mention XML) is too limited in describing the syntax of
attribute values. The prose of the specification says that class
attribute's value shall be a space-separated list of class names.
Somewhat strangely, the HTML specification does not define the syntax
of class names, but it is natural to expect them to obey normal syntax
of names in HTML. This permits "-" and "_" among other things.
According to CSS specifications, the range of characters permitted in
class names is much wider, but I wouldn't rely on such things.
(See
http://www.w3.org/TR/CSS2/syndata.ht...def-identifier )
Id attributes are declared as ID, which imposes specific syntax.
Special characters in different names may cause problems for reasons
external to CSS. If the name of a form field contains "-" or "_", then
problems may arise if the form handler cannot deal with them. But then
the question is what the form handler can do, rather than what HTML
syntax permits.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html