Summary -

In this topic, we described about the SVG Drawing Half Circle with detailed example.

<svg> with <circle> element is used to create the circles based on center point and a radius. We can aslo create a half circle in SVG using the radius value as a percentage. i.e from 0% to 100%.

Syntax -

    <circle cx="x-center-val" cy="y-center-val" r="radius-val" 
		fill="color-name" stroke="stroke-color" 

<circle> tag have the following attributes -

Attribute Value
cx Specifies the inside of the circle from x axis.
cy Specifies the inside of the circle from y axis.
r Specifies the radius of circle.
fill Specifies the fill environment of Circle.
stroke Specifies the outline color of circle.
stroke-width Specifies the width of stroke. 


<!DOCTYPE html>
    	<h2>SVG Half Circle </h2>
    	<!--First half circle-->
    	<svg height="500" width="200">
      		<circle cx="220" cy="220" r="20%" fill="yellow" />
    	<!--Second half circle-->
    	<svg height="500" width="200">
      		<circle cx="0" cy="220" r="50%" fill="pink" />

Output -