Skip to content Skip to sidebar Skip to footer

Convert An Inline Svg Into A Svg File

I have the following SVG that I use inline: xmlns attribute to the root <svg> element.

<svg xmlns="http://www.w3.org/2000/svg" ....

If you are doing an icon that has xlink:href attributes, you should also add the xlink namespace.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ....

That should be enough for browsers. But if you want to be pedantic, or are going to have the file processed by programs other than a browser, you may need to add the full XML preamble:

<?xml version="1.0" standalone="no"?><!DOCTYPE svgPUBLIC"-//W3C//DTD SVG 1.1//EN""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svgxmlns="http://www.w3.org/2000/svg"....

Post a Comment for "Convert An Inline Svg Into A Svg File"