SVG Full Form (original) (raw)

Last Updated : 23 Jul, 2025

SVG is an abbreviation for Scalable Vector Graphics which is an XML-based file format used for the representation of two-dimensional vector graphics. SVG graphics are needed when there is a concern for high-quality graphics on web pages. The scalable graphics can be created using the element, which can be integrated easily into an HTML file. It has attributes like height and width to define an area where the vector will be created.

Table of Content

We will explore all the above concepts with the help of suitable examples.

Features

SVG Components

The element is the container for SVG graphics. All the other SVG elements or components are wrapped inside it. The below table illustrates the elements that form shapes.

Components Descriptions
Circle The element used to create a circle.
Ellipse The element used to define an ellipse.
Line The element is used to draw a straight line between two points.
SVG Path The element used for creating complex shapes using path data.
Polygon SVG The element used to create a closed polygon shape.
Polyline SVG The element used to draw a series of connected straight-line segments.
Rectangle SVG The element used for creating a rectangle.
Text SVG The element embeds text within the SVG.
Stroking SVG It applies to stroke to an element and groups multiple SVG elements together.

Please refer to the SVG Element Complete Reference article for the detailed descriptions.

Properties

The below table illustrates how each SVG property can be used for the specified SVG elements on a web page along with their description.

Property Descriptions
width Give the width of the SVG element in pixels.
height Give the height of the SVG element in pixels.
stroke Provide the outline to the shape.
stroke-width Defines the thickness of the stroke.
fill Fill the color inside the shape of the SVG element

Creating Scalable Vector Graphics

Create the element, and include the width and height as attributes in pixels. There are several elements like circles, ellipses, etc., to make shapes wrap the element inside element. Give different attributes to the element shapes for styling purposes.

Example 1: The below example illustrates the basic example of Scalable Vector Graphics for creating a circle.

HTML `

Input type

`

Output:

circlesvg

Example 2: The below example illustrates the basic example of Scalable Vector Graphics for creating rectangles.

HTML `

SVG Rectangle

GeeksforGeeks

SVG Rectangle

<svg width="120" 
     height="120">
    <rect x="20"
          y="20" 
          rx="16" 
          ry="16" 
          width="85" 
          height="85"
          stroke="green"
          stroke-width="2" 
          fill="greenyellow">
    </rect>
</svg>

`

Output:

svg10

Advantages and Disadvantages

Advantages

Disadvantages