Jump to content

validation problem


Pyro_854

Recommended Posts

I validated a local html 4.01 file and it gave me this:Error Line 13 column 26: there is no attribute "WIDTH". <td colspan="3" width="1000" height="200">You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. <td colspan="3" width=["]1000" height="200">[] indicates what the validator underlined.It also does this with the height attribute on the same line.I have several other width and height attributes but this is the only line the validator detects as "bad".Is there something I'm not seeing or is the validator just messing with me?

Link to comment
Share on other sites

The validator is right, there is no such thing as an attribute "width".There is, but it is depreciated in Xhtml Strict, so if you use that doctype (Xhtml 1.0+ strict, or Html 4.0+) then you should not use attribute width, but style the element by using classes and a stylesheet or inline styles with attribute "style" :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...