Mike A wrote: > I'm experimenting with using a class in the <html> tag, for example: > > <html class="ff" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > lang="en"> > > It works fine in Firefox and IE but doesn't validate (XHTML 1.0 Strict) - > validation fails immediately after the "class=" declaration. I've searched > without luck for information on this. > > Can someone please tell me about this or point to links. >
According to the XHTML 1.0 Strict DTD, the only attributes allowed on the html element are id, xmlns, and the internationalisation attributes (lang, xml:lang and dir): <http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_html> so the class attribute is not allowed there. As a general rule the mere fact that something works in various browsers means nothing at all as far as standards compliance is concerned - browsers are built specifically to cope with the utterly wrong markup that litters the web. If you want to know whether something is valid, read the standards. (BTW, when posting a new question to the list you shouldn't reply to an existing thread; this messes up the archives, and people like myself who use a threading email client will quite possibly never see your post if it's in a thread we're not following.) Cheers, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/