tags:

views:

40

answers:

2

on how many elements Width="...." is attribute deprecated/non-valid in XHTML 1.0 strict? and where not?

After seen David's link i screenshoted the information of width

alt text

+4  A: 

The same as in HTML 4.01. You can count them on the attributes table.

David Dorward
i think w3c schools has wrong info about deprecated elements
metal-gear-solid
Probably. W3Schools is often wrong. Why do you mention that nasty little commercial organization though? I didn't mention them in my answer.
David Dorward
+1. I chuckle to myself everytime someone mentions W3Schools, just because I've come to expect a comment from you expressing your hatred of them ;-)
Andy E
according to this link width is allowed on Iframe, img, object, table, col and colgroup
metal-gear-solid
where is the link of XHTML?
metal-gear-solid
XHTML what? There are several versions.
David Dorward
Hang on. "w3c schools"? There's no such entity. There is "the W3C" and there is "W3Schools". Two completely separate organizations, related only by the WWW.
David Dorward
XHTML 1.0 Strict . and on this link "Border" is valid http://www.december.com/html/x1/element/td.html
metal-gear-solid
XHTML 1.0 is HTML 4.01 in XML. There isn't any difference in the elements and attributes except those imposed by being XML (which basically means `xmlns` and mixed namespaces). And what does "border" have to do with anything? It hasn't been mentioned previously in this question.
David Dorward
+1  A: 

You've seen the official answer above, but I would urge you to think more about why you would use width and height attributes in some instances and CSS in others.

With images, for example, usually every image on a page would be a different size. The size is also a property of the image itself and unrelated to the page layout. Therefore, you should normally use the width/height attributes on images.

The only exception is if you have a set of images all with the exact same dimensions (e.g. thumbnails in an image gallery). In this case, set a class on the wrapping element and target those images in CSS. The same approach may also apply to flash objects, if they're mad to fit a certain pixel size.

For pretty much every other element, use CSS instead of the attributes, because that would all be related to layout.

DisgruntledGoat