View Single Post
Old 09-03-2022, 03:44 AM   #13
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,117
Karma: 92190133
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Turtle91 View Post
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.
jhowell is online now   Reply With Quote