The "attribute 'X' is not declared for element 'Y'" error always means that attribute X is not allowed. I've always thought the wording was a bit ambiguous for casual users. Replacing X with the equivalent CSS attribute (whether inline or with an external/internal stylesheet) is nearly always the way to eliminate that particular error.
EDIT: Fixed my silly typo that made my post say the exact opposite of what I intended.