1
0
mirror of https://github.com/svg/svgo.git synced 2025-09-17 08:02:12 +03:00
Files
svgo/docs/04-plugins/removeXMLNS.mdx
2024-06-16 00:10:42 +01:00

22 lines
793 B
Plaintext

---
title: removeXMLNS
svgo:
pluginId: removeXMLNS
---
Removes the `xmlns` attribute from the top-most `<svg>` element in the document.
It's recommended to use this plugin if you intend to inline SVGs into an HTML document. HTML does not support explicit namespaces, so these are ignored by the browser anyway.
:::tip
This plugin pairs well with the [removeXlink](/docs/plugins/removeXlink/) plugin, which drops XLink namespaces and migrates references the modern equivalent, supported by SVG 2 and inline an HTML document. When using removeXMLNS, it's recommended to enable removeXlink too.
:::
:::caution
This plugin renders SVGs unusable as standalone assets, in HTML `<img>` elements, or CSS [pseudo-elements](https://developer.mozilla.org/docs/Web/CSS/CSS_pseudo-elements).
:::