SVG Circle

You are Here:

How to Draw a Circle?

The <circle> SVG element that draws circles based on a center point and a radius.

In this example, we will draw a circle of radius 40 by using <circle> SVG element.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> svg circle{ stroke:red; stroke-width:3; fill:green; } </style> </head> <body> <svg height="100" width="100"> <circle cx="50" cy="50" r="40" /> </svg> </body> </html>

Attributes Value

AttributeExplanation
cxx-axis co-ordinate of the center of the circle. Default is 0.
cyy-axis co-ordinate of the center of the circle. Default is 0.
rradius of the circle.

Reminder

Hi Developers, we almost covered 91% of SVG Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in SVG.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author