What is SVG?
SVG is an acronym for scalable vector graphics. It is a specification, maintained by the World Wide Web Consortium (W3C), for describing two-dimensional vector graphics in XML.
As technology advances, it has become easier to create and share vectors, and SVG is no exception. In fact, Svg has become a standard of web design because of its simplicity and ability to scale up without losing quality
The files are smaller in size and highly suitable for the web. SVG is a standard way of drawing graphics with XML. There are different types of SVG files like image, text, shapes and diagrams. Each of these file types have different formats that are compatible with different software applications.
Difference between SVG and Canvas
The SGV is a new type of canvas that was designed to give users great control over what they are looking at. It is not just any old screen. You can pinch, zoom, and drag with your fingers to get a close-up view of the canvas and explore the image more thoroughly.
Canvas allows users to be creative with their images but the SGV takes it a step further by giving users complete control. They have more options because they can manipulate their images on a greater level than Canvas can allow them to do.
The SGV includes features such as being able to zoom in and out of an image, changing the size of the canvas, flipping it horizontally or vertically, moving it around on the screen, and dragging it with your fingers.
Format of SVG vs Canvas images
SVG and canvas are two formats that are used widely in today’s computer graphic design. SVG is a vector format which means it can be scaled without losing quality, while canvas is an raster format. SVG is an XML based language for doing vector and raster graphics. It was originally developed as a way to display SVG format on a web browser. However, it’s now being used for many other purposes such as publishing on the web and creating interactive applications.
SVG images can be animated with code that’s written in JavaScript, while canvas images cannot. SVG images are not impacted by a refresh rate or screen resolution and can be easily shared through social media platforms like Facebook and Twitter.
Canvas is an HTML5 based language with built-in support for JavaScript, which enables developers to draw on the canvas using graphical commands. Originally, it was designed to allow artists and designers to create interactive content without having to use third-party libraries or plugins.
Things we can draw with SVG
SVG allows us to create shapes, lines, text, and images with code. This can be done by using a program that supports SVG such as Adobe Illustrator or Inkscape.
The following are the things we can draw in the SVG format: text, paths (lines and curves), circles and ellipses (circles with rounded corners), polygons and arcs, rectangles and rounded rectangles, polygons with rounded corners (known as “rounded triangles”).