HTML5 − SVG Circle

Following is the HTML5 version of an SVG example which would draw a circle using <circle> tag

<!DOCTYPE html>
         #svgelem {
            position: relative;
            left: 50%;
            -webkit-transform: translateX(-20%);
            -ms-transform: translateX(-20%);
            transform: translateX(-20%);
      <meta charset="utf-8" />
      <h2 align="center">HTML5 SVG Circle</h2>
      <svg id="svgelem" height="200" xmlns="">
         <circle id="redcircle" cx="50" cy="50" r="50" fill="red" />

This would produce following result in HTML5 enabled latest version of Firefox.

It will produce the following result −svgcircle


One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s