SVG Circle (original) (raw)

Last Updated : 28 Apr, 2025

SVG Circle facilitates the element which can be utilized to create a circle. Basically, the element wrapped inside the element.

Syntax

Attributes

The below are the attributes that can be used with the element

Example 1: In this example, we will implement code to see the SVG circle with the the help of above attributes.

HTML `

SVG to HTML

GeeksforGeeks

SVG Circle

    <svg width="200"
         height="200" 
         style="border: 2px solid black;">
        <circle cx="95" 
                cy="95"
                r="70" 
                stroke="green" 
                stroke-width="5" 
                fill="yellowgreen" />
    </svg>
</div>
<script src="script.js"></script>

`

Output:

svg-circle1

Output

Example 2: In this example, we will show an SVG circle in HTML with the help of JavaScript.

HTML `

SVG to HTML

GeeksforGeeks

SVG Circle

    <svg width="200" 
         height="200" 
         style="border: 2px solid black;">
        <circle cx="95" 
                cy="95" 
                r="70" 
                stroke="blue" 
                stroke-width="5" />
    </svg>
</div>
<script src="script.js"></script>

`

Output:

svg-circle