On 29 October 2010 16:56, David Dorward <da...@dorward.me.uk> wrote:

>
> On 28 Oct 2010, at 17:31, Foskett, Mike wrote:
>
>  Since querying here I've had difficulty validating code with a class on
> the html element.
> Am I incorrect in the belief that it should actually be valid?
>
>
> The class <http://www.w3.org/TR/html4/struct/global.html#adef-class> 
> attribute,
> in the latest, stable version of HTML is available for All 
> elements<http://www.w3.org/TR/html4/index/elements.html>but
> BASE <http://www.w3.org/TR/html4/struct/links.html#edef-BASE>, 
> BASEFONT<http://www.w3.org/TR/html4/present/graphics.html#edef-BASEFONT>,
> HEAD <http://www.w3.org/TR/html4/struct/global.html#edef-HEAD>, 
> HTML<http://www.w3.org/TR/html4/struct/global.html#edef-HTML>,
> META <http://www.w3.org/TR/html4/struct/global.html#edef-META>, 
> PARAM<http://www.w3.org/TR/html4/struct/objects.html#edef-PARAM>,
> SCRIPT <http://www.w3.org/TR/html4/interact/scripts.html#edef-SCRIPT>,
> STYLE <http://www.w3.org/TR/html4/present/styles.html#edef-STYLE>, 
> TITLE<http://www.w3.org/TR/html4/struct/global.html#edef-TITLE>
>
> <http://www.w3.org/TR/html4/struct/global.html#edef-TITLE>Source:
> http://www.w3.org/TR/html4/index/attributes.html
>
>
That isn't necessarily correct..... or at least, that is only required for
"document validation".

Browsers support expando elements (aka, you can bind properties into the DOM
object), so adding a "class" attribute is valid... and a browser will
CSS-render according to the class attribute, as the spec doesn't say that it
shouldn't if being manipulated by the scripting engine.

So technically speaking, adding a class to the html element, is perfectly
valid.

... whether expando elements need to be spec-validated, after the document
has already been parsed, would be a separate discussion...

cheers,
Mathew Robertson


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to