XML technologies / SVG / Creating simple SVG graphics / SVG tag syntax / The circle tag

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

The <circle> tag creates circles. Besides the universal attributes id and style, it has only three specific attributes: cx, cy and r.

Note:
cx abbreviates center x and cy abbreviates center y. They specify the circle center’s coordinates. r similarly abbreviates radius and specifies the radius.

The code <circle cx="100" cy="100" r="20"/> creates a circle centered at x=100, y=100 with radius 20 pixels and diameter 40 pixels. Its result could look as follows:

Figure: The circle in the browser

Figure: The circle in the browser.

   

 

 

 

back to top