I'm trying to add an ellipse in a SVG
(original snippet)
<svg>
<rect x="0" y="0" width="100" height="100"></rect>
<circle cx="200" cy="0" r="100"></circle>
<ellipse cx="400" cy="0" rx="100" ry="50" fill="yellow"></ellipse>
</svg>
But adding some attributes works:
(working snippet)
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%">
<rect x="0" y="0" width="100" height="100"></rect>
<circle cx="200" cy="0" r="100"></circle>
<ellipse cx="400" cy="0" rx="100" ry="50" fill="yellow"></ellipse>
</svg>
Questions:
- What are the attributes of
xmlns
andversion
for? - Why is the ellipse NOT showing up in the original snippet (but the rect and the circle show up properly)?
See here for a jsfiddle.