Skip to content
Related Articles

Related Articles

SVG Element Complete Reference

Improve Article
Save Article
  • Last Updated : 01 Apr, 2022
Improve Article
Save Article

SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. It is a type of vector graphic that may be scaled up or down. Elements are the core things that is required to work with SVGs.

List of SVG Elements:

Below example will give you a brief idea that how to use the SVG Element:

Example: In this example, we will add an Image and create a polygon.

HTML




<!DOCTYPE html>
<html>
<body>
   <center>
   <h1 style="color:green;">
      GeeksforGeeks
   </h1>
   <b>SVG Elements Image and Polygon</b>
   <center>
      <svg width="200" 
           height="200"
           xmlns="http://www.w3.org/2000/svg">
         <image href=
                height="150" 
                width="150"/>
      </svg>
      <svg width="200px" 
           height="200px">
         <!-- try different pairs and make different shapes-->
         <polygon points="100, 100 15, 205 150, 7 20, 0"
                  fill="green" 
                  stroke="yellow"/>
      </svg>
   </center>
</body>
</html>


Output:

SVG Element

SVG Element


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!