When I view a html page with SVG files without CSS, embedded SVGs are expanded to the full viewport of browser, too big. Is it a way to hold SVG small in HTML view?
Maybe only
<svg width="50" height="50">
?
When I view a html page with SVG files without CSS, embedded SVGs are expanded to the full viewport of browser, too big. Is it a way to hold SVG small in HTML view?
Maybe only
<svg width="50" height="50">
?
Yes, you can scale SVGs using the
width
andheight
HTML attributes like this:SVG also provides a number of other attributes like
viewbox
andpreserveAspectRatio
to help you manage size, position, and scale. Check out this article on CSS-Tricks for more info.