How to Create Custom Shape Button using SVG ? Last Updated : 27 Apr, 2020 Comments Improve Suggest changes Like Article Like Report To design the shape of an HTML button we can use SVG elements (Scalable Vector Graphics). It basically defines the vector-based graphics in XML format. Every element and every attribute in SVG files can be animated. We can use SVG to create 2-D graphics of any custom shape. Example 1: This example creating a circle shape button using SVG. html <!DOCTYPE html> <html> <head> <title> Create custom shape button </title> </head> <body> <h1 style="color:green;">GeeksforGeeks</h1> <h3>Circle Shape Button</h3> <svg width="500" height="500"> <a href="#"> <Circle cx="60" cy="60" r="50" stroke="black" fill="green" stroke-width="3"/> </a> </svg> </body> </html> Output: There are many more shapes available in SVG elements such as boxes, text, rectangles, etc. Example 2: This example creating a rectangle shape button using SVG. HTML <!DOCTYPE html> <html> <head> <title> Rectangle Shape Button </title> </head> <body> <h1 style="color:green;">GeeksforGeeks</h1> <h3>Rectangle Shape Button</h3> <svg width="300" height="200"> <a href="#"> <rect width="250" height="150" style="fill:rgb(0, 255, 0); stroke-width:5;stroke:rgb(0, 0, 0)" /> </a> </svg> </body> </html> Output: Example 3: This example creating a star shape button using SVG. html <!DOCTYPE html> <html> <head> <title> Star Shape Button </title> </head> <body> <h1 style="color:green;">GeeksforGeeks</h1> <h3>Star Shape Button</h3> <a href="#"> <svg width="300" height="200"> <polygon points="100, 10 40, 198 190, 78 10, 78 160, 198" style="fill:green; stroke:black; stroke-width:5; fill-rule:evenodd;" /> </svg> </a> </body> </html> Output: Example 4: This example creating a flag shape button using SVG. html <!DOCTYPE html> <html> <head> <title> Flag Shape Button </title> </head> <body> <h1 style="color:green;">GeeksforGeeks</h1> <h3>Flag Shape Button</h3> <svg width="240" height="240"> <a href="#"> <path d="M 0 0 L 120 0 L 120 120 L 60 80 L 0 120 Z" fill="green"/> <text x="60" y="50" fill="#FFFFFF" text-anchor="middle" alignment-baseline="middle"> GeeksforGeeks. </text> </a> </svg> </body> </html> Output: Comment More infoAdvertise with us Next Article How to Create Custom Shape Button using SVG ? C cybercreed010 Follow Improve Article Tags : Web Technologies HTML HTML-Misc Similar Reads How to create shape using CSS clipping ? You can easily create shapes using the clip-path property in CSS. Actually clip-path property lets you clip an element to a basic shape. The basic shape like circle, ellipse, the polygon can be achieved using the <basic-shape> property value of clip-path which will be discussed further in this 3 min read How to Animate SVG with border-image using CSS ? Scalable Vector Graphics or SVG is used to set vector-based graphics for the web. In this article, we will learn how to animate an SVG with border-image using CSS.Approach: Using the border-image property, there is an SVG element within which a rect element is defined to represent a rectangle of a s 3 min read How to Fill Colors in Shapes using Applet? In this article, we will fill the random attractive colors in shapes like rectangles, circles, and squares using Applet. Here, we will have three buttons rectangle, circle, and square. When the user clicks on the button the shape will get filled with random color on every click. Approach to the Prog 4 min read Java Program to Create Different Shapes using Applet In this article, we will be creating different shapes using Applet. Here, we have taken an Input field, where the user can enter the name of the shape and click on the button. After clicking on the button, the shape that is entered will get drawn on the Applet window. OverviewInitially, we have to i 4 min read React Suite Button Size React Suite is a front-end library designed for the middle platform and back-end products. Button Component allows the user to interact with the webpage. The Button Component has a number of properties of its own like appearance, size, color, etc. Here we will look into the size property. Size Prop 2 min read Like