Computer Science, asked by kameshkumar4292, 1 year ago

How to draw shapes using SVG in HTML5?

Answers

Answered by riyadas03
0

<!doctype html >

<html>

<head>

<title> rectangle </title >

</head>

<body>

<svg width="400" height="110">

<rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />

</svg>

</body>

<!doctype html >

<html>

<head>

<title> rectangle </title >

</head>

<body>

<svg width="400" height="180">

<rect x="50" y="20" width="150" height="150"

style="fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9" />

</svg>

</body>

</html>

just change it's svg tags here are some tags

SVG has some predefined shape elements that can be used

Rectangle <rect>

Circle <circle>

Ellipse <ellipse>

Line <line>

Polyline <polyline>

Polygon <polygon>

Path <path>

hope it'll help you.

Similar questions