When to use the
version SVG attributes
Published on in SVG
Last updated on
xmlns attribute is required for SVG files
but optional for inlined SVGs.
version attribute is always optional.
Table of contents
xmlns:xlinkattributes are optional for inlined SVGs in HTML.
xmlnsattribute is required for SVG files.
xmlnsattribute is required for SVGs in CSS, e.g.:
xmlns:xlinkattribute is required for SVG files that contain
xlink:attributes. Similarly for SVGs in CSS.
version attribute is ignored and thus always optional.
Plus it's deprecated since SVG 2.