Quote:
Originally Posted by Turtle91
It is preferred to have that in the CSS rather than the HTML. Ideally you would have ALL styling in your CSS and only structural elements in your html.
Code:
in the HTML tag:
<img alt="basicdrawing" width="100%" src="../Images/basicdrawing.svg"/>
in CSS:
img {width: 10%; max-width: 1000px;}
I think at one point 'they' were trying to deprecate it in the html tag (???), but as far as I know it is still allowed...just a little gauche.
|
My understanding is that the "width" and "height" attributes for an "img" element in HTML 5 only allow an integer value without a unit.