html <circle> code example

Example 1: css circle

#circle {
      width: 100px;
      height: 100px;
      background: red;
      border-radius: 50%
    }

Example 2: svg circle

<svg width="100" height="100">
  <circle cx="50%" cy="50%" r="10" fill="red"/>
</svg>

Example 3: circle css

#circle {
  width: 100px;
  height: 100px;
  background: red;
  border-radius: 50%
}

Example 4: how to make a circle in html

<svg xmlns="http://www.w3.org/2000/svg">
    <circle cx="50" cy="50" r="50" fill="red" />
</svg>

Example 5: make a circle in javascript

<!DOCTYPE html>
  <html>
  <head>
  <meta charset=utf-8 />
  <title>Draw a circle</title>
  </head>
  <body onload="draw();">
  <canvas id="circle" width="150" height="150"></canvas>
  </body>
  </html>

Tags:

Css Example