New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Can i draw a square or any other shapes with svg tag?
Only the example of circle is given
2 Answers
+ 4
You can draw any shape with SVG, you can use points and curviture to mark out a shape and then fill that shape with a color.
The benefits with SVG is that whatever shape you create will always be pixel perfect.
Here is the documentation for all SVG elements:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element
+ 2
Yes you can. Try to think out of the box and manipulate the codes that have already been given in the lesson factory to draw other shapes and I'm sure you'll get it before you know