Wednesday, 10 December 2014

Do I need to keep the xml header in an svg file when embedding it in the web page



I have an SVG image that I want to embed on a web page (inside a html file)


I created the image with Adobe Illustrator and it contains the following headers:



<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://ift.tt/IHuy5b">
<svg version="1.1" id="Layer_1" xmlns="http://ift.tt/nvqhV5" xmlns:xlink="http://ift.tt/PGV9lw" x="0px" y="0px"
viewBox="0 0 462.219 381.915" enable-background="new 0 0 462.219 381.915" xml:space="preserve">
...


Do I need the xml and DOCTYPE declarations? Or just embedding the contents of the <svg> tag is fine?


No comments:

Post a Comment