The description ot the style property does not seem correct.
From the W3C DOM 2 reference (Section 1.6.4):
"The style attribute of an HTML element is accessible through the ElementCSSInlineStyle interface which is defined in the CSS module [DOM Level 2 Style Sheets and CSS]." <URL:http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-011100101>
Following that link makes me think that the style attribute of an HTML element is part of the CSS2 extended interface:
"The CSS2Properties interface represents a convenience mechanism for retrieving and setting properties within a CSSStyleDeclaration." <URL:http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-extended>
and that it is not a 'block' but an object with proerties that can be changed. The current description is:
"Returns the block of style rules on the element."
maybe is should be:
"Returns the style object of the element."
In the notes section it states:
"though you cannot set style on an element by assigning to the style property directly"
Which is also incorrect. Style properties can be set directly, however the affect of setting them must be considered within the context of cascading styles and specificity (i.e. their affect may be over–ridden by some other style rule).
I'll leave this comment here for a while, if there is no indication to the contrary, I'll go ahead and make changes.
Yep, this page was wrong. I think I've made the necessary changes. -David Baron 22:40, 27 December 2005 (PST)