I just noticed that Chrome resizes this image while maintaining its aspect ratio :
<!DOCTYPE html> <img style="width: 100%; height: 100%;" src="image.jpg">
If there is no document like HTML5, the image is distorted:
<img style="width: 100%; height: 100%;" src="image.jpg">
This only works when the image container is a document, it does not work if the image is in a div , for example.
What is this function, and can I somehow scale the image to the full size of the window without deleting the doctype?
source share