An SVG document is also an XML document: Therefore, an SVG document begins with an optional XML declaration. It also, optionally, begins with a DOCTYPE declaration.
All SVG documents have, as the root element, an <svg> element. The width and height attributes of the <svg> element define the size of the SVG image. The SVG element also has other attributes such as x and y, which are used to position an SVG graphics element. However, on an <svg> element that is the root element, any x or y attribute has no effect.
A skeleton SVG document is shown in Listing 23.8. The DOCTYPE shown is that for the SVG 1.0 Recommendation of September 2001.
<?xml version="1.0" ...