HTML svg Tag
HTML svg Tag
The svg tag defines a container for SVG graphics. It has several methods for drawing circles, boxes, text, and many more graphic-related things.
To draw shapes with SVG, you first need to create an SVG element tag with two attributes: width and height. To create a circle, add a circle tag. Some of its perimeters are:-
Circle tag explanation:-
- cx pushes the center of the circle further to the right of the screen
- cy pushes the center of the circle further down from the top of the screen
- r defines the radius
- fill determines the color of our circle
- stroke adds an outline to the circle
For your Information:-
To create a rectangle, we have to use rect tag. For eclipse, we have to use an ellipse tag and for polygon, we have to use a polygon tag.
Syntax:-
Its syntax is:- < svg >