Skip to main content
HTML Validation

Attribute with the local name “xmlns:dc” is not serializable as XML 1.0.

About This HTML Issue

Namespace declarations like xmlns:dc on an <svg> element are not serializable as XML 1.0 when used in an HTML5 document.

In HTML5 (the text/html serialization), namespace declarations using the xmlns: prefix syntax are not valid attributes. The HTML parser does not treat these as actual XML namespace declarations — it sees them as regular attributes with a colon in the name, which cannot be serialized back to well-formed XML 1.0. This commonly happens when SVG code is exported from graphic editors like Inkscape or Adobe Illustrator, which include Dublin Core (dc), RDF, and other XML namespace declarations that are unnecessary for rendering.

The SVG will render perfectly fine in browsers without these namespace prefixes. If the <svg> element doesn't actually use any elements or attributes from those namespaces (like <dc:title>), you can safely remove them. If it does contain such elements, those elements are also typically unused by browsers and can be removed as well.

Invalid Example

<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  viewBox="0 0 100 100">
  <metadata>
    <rdf:RDF>
      <rdf:Description rdf:about="">
        <dc:title>My Icon</dc:title>
      </rdf:Description>
    </rdf:RDF>
  </metadata>
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>

Valid Example

Remove the namespace declarations and any associated metadata elements:

<svg viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>

If you still want to provide a title for accessibility, use the standard SVG <title> element instead:

<svg viewBox="0 0 100 100" role="img">
  <title>My Icon</title>
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries