For standalone SVG(.svg files), is it mandatory to include the the DOCTYPE and the XML declaration ?

1 Answers

Robert Longson On Best Solutions

A doctype is not required some people recommend not using it

In XML 1.1 the XML declaration is mandatory though. If it's omitted the document is supposed to be treated as XML 1.0 which may or may not be what you wanted. Note that browsers don't enforce this requirement so if that's your only use case you can omit the XML declaration.