开发者

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

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 http://shup.com/Shup/293985/110210134453-My-Desktop.png开发者_JAVA百科


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜