Can anyone tell me how to force Opera opera to render SVG in html?
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="142" height="142">
<rect x="19" y="19" width="104" height="104" r="0" rx="0" ry="0" fill="none" stroke="#000000"
style="stroke-opacity: 1; stroke-width: 2;" stroke-opacity="1" stroke-width="2"/>
<rect x="36" y="36" width="70" height="70" r="0" rx="0" ry="0" fill="none" stroke="#000000"
style="stroke-opacity: 1; stroke-width: 2;" stroke-opacity="1" stroke-width="2"/>
</svg>
This code works fine if file extension is not .html
upd:
I’m trying to put div with svg inside generated by raphael.js in new window. And it doesnt work in Opera.
To have SVG in HTML working, the browser must have an HTML5 parser and Opera will have one only since version 12.
If you absolutely have to have SVG right in the HTML code, you need your document to have an xhtml file extension an be a valid xml file (if you are running it from disc), and it also has to be served with
application/xhtml+xmlmime type or another valid xml mime type when sent from a web server.