<html>
  <head>
    <title>svg-as-image-with-relative-size-expected</title>
    <style>
      body {margin: 0px;}
    </style>
  </head>
  <body>
    <div style="width: 400px; height: 400px; border: 1px solid black;">
        <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
            <rect x="40" y="40" width="120" height="120" fill="green"/>
        </svg>
    </div>
  </body>
</html>

