title: HTML img scaling
body: <p>I'm trying to display some large images with HTML img tags. At the moment they go off the edge of the screen; how can I scale them to stay within the browser window?</p>
  
  <p>Or in the likely event that this is not possible, is it possible to at least say "display this image at 50% of its normal width and height"?</p>
  
  <p>The width and height attributes distort the image -- as far as I can tell, this is because they refer to whatever attributes the container may end up with, which will be unrelated to the image. I can't specify pixels because I have to deal with a large collection of images each with a different pixel size. Max-width doesn't work.</p>