 <p>This is answered (with examples) in the <a href="http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#SVG_web">svg primer</a>.</p> <p>tl;dr summary:</p> <ul> <li>remove 'width' and 'height' attributes on the svg root, and add a 'viewBox' attribute with the value "0 0 w h", where w and h are the absolute values usually found in the width and height attributes (note that percentages and other units aren't allowed in the viewBox attribute)</li> </ul>