About This HTML Issue
Custom XML namespace declarations like xmlns:dc are not allowed on <svg> elements in HTML5 documents.
In HTML5 (as opposed to XHTML), the parser only recognizes a limited set of namespace attributes on SVG elements: xmlns and xmlns:xlink. Any other namespace declarations, such as xmlns:dc, xmlns:cc, xmlns:rdf, or xmlns:svg, are invalid. These namespaces are commonly added by SVG editors like Inkscape but serve no purpose in an HTML5 context.
The SVG metadata that relies on these namespaces (like Dublin Core dc: elements or Creative Commons cc: elements) is also typically unnecessary when embedding SVGs in HTML. You can safely remove these namespace declarations and their associated metadata elements without affecting how the SVG renders.
Invalid Example
<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 100 100"
width="100"
height="100">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title>My Icon</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<circle cx="50" cy="50" r="40" fill="blue" />
</svg>
Valid Example
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 100 100"
width="100"
height="100">
<circle cx="50" cy="50" r="40" fill="blue" />
</svg>
Remove all non-standard xmlns: attributes and the <metadata> block they support. If you're exporting from a tool like Inkscape, look for a "plain SVG" or "optimized SVG" export option, or use a tool like SVGO to clean up the output automatically.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.