RomeScape

Programming => HTML => Topic started by: Mazead on October 17, 2014, 05:22:42 am



Title: inline html width & height
Post by: Mazead on October 17, 2014, 05:22:42 am
To speed up page load, I'm adding inline style to my html for the images - but curiously, the recommended w3schools method isn't working:
Quote
<img src="test.png" alt="test" width="120" height="80"/>

...while what I thought was 'old fashioned' is:

Quote
<img src="test.png" alt="test" style="width:300px; height:auto"/>

I'm using XHTML 1.0 Transitional - is the first example HTML5 only?