Should image size be defined in the img tag height/width attributes or in CSS?

Posted by Benjamin Manns on Stack Overflow See other posts from Stack Overflow or by Benjamin Manns
Published on 2010-03-10T04:25:49Z Indexed on 2010/03/28 2:03 UTC
Read the original article Hit count: 309

Filed under:
|
|
|

Is it better coding practice to define an images size in the img tag's width and height attributes?

<img src="images/academia_vs_business.png" width="740" height="382" alt="" />

Or in the CSS style with width/height?

<img src="images/academia_vs_business.png" style="width:740px; height:382px;" alt="" />

Or both?

<img src="images/academia_vs_business.png" width="740" height="382" style="width:740px; height:382px" alt="" />

© Stack Overflow or respective owner

Related posts about html

Related posts about css