PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

drawing a basic svg circle in html

<svg height="100" width="100">
ย  <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>

It's really easy to draw a circle in SVG. The code above is a basic example of a 100x100 circle. The cx and the cy is where you want to draw the circle. If those are omitted, the circle will be drawn at 0,0.

Next, you want to specify the r radius. Above you can see it is set to 40. This is because we have a stroke width and we don't want it to sit outside the *100x100 container.

Here is a basic circle without the stroke (notice the r is set to 50):

<svg height="100" width="100">
  <circle cx="50" cy="50" r="50" />
</svg>

BETA Snippet explanation automatically generated by OpenAI:

No explanation generated yet.

Snippet By Tony Lea

ยท

Created June 16th, 2021

ยท

Report Snippet