O'Reilly logo

Designing SVG Web Graphics by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The <svg> Element

Each SVG document or document fragment must have as its containing element the element root, a <svg> element. The <svg> element usually contains width and height attributes, which define the width and height of the SVG image. If no width or height is specified, the width and height are both assumed to be 100 percent of the available browser window.

NOTE

The area defined by the <svg> element is the SVG initial viewport. Conceptually, it is a rectangular area through which you can view what is displayed on an area of the infinite SVG canvas. The width and height attributes define its dimensions. On an outer <svg> element, the default values of the x and y attributes (which define the position of the upper-left corner of the viewport) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required