What is SVG?
- SVG stands for Scalable Vector Graphics.
- It basically defines vector-based graphics in XML format.
- SVG graphics do NOT lose any quality if they are zoomed or resized.
- Every element and every attribute in SVG files can be animated.
What are the advantages of SVG?
Advantages of using SVG over other image formats (like JPEG and GIF) are:
- SVG images can be created and edited with any text editor.
- SVG images can be searched, indexed, scripted, and compressed.
- SVG images are scalable.
- SVG images can be printed with high quality at any resolution.
Differences between HTML SVG and HTML Canvas
- If attributes of an SVG object are changed, the browser can automatically re-render the shape whereas Canvas is rendered pixel by pixel.In canvas, once the graphic is drawn, it is forgotten by the browser.
- SVG is resolution independent whereas CANVAS is resolution dependent.
- SVG supports event handlers whereas CANVAS doesnt have a support for event handlers.
Drawing A SVG Circle in HTML
Drawing A SVG Rectangle in HTML
Drawing A SVG Rounded Rectangle in HTML
Drawing A SVG Star in HTML
Drawing A Logo in HTML using SVG
Supported Browser: Supported browsers are listed below
- Google Chrome 4.0
- Internet Explorer 9.0
- Firefox 3.0
- Opera 10.1
- Safari 3.2
- Inline HTML Helper - HTML Helpers in ASP.NET MVC
- HTML | <html> xmlns Attribute
- HTML Course | Structure of an HTML Document
- HTML | DOM HTML Object
- HTML Course | Basics of HTML
- What is the difference between <html lang="en'> and <html lang="en-US'> ?
- HTML | dt Tag
- HTML | dl Tag
- HTML | <nav> Tag
- Div Tag | HTML
- HTML | <ol> Tag
- HTML | col Tag
- HTML | <ul> Tag
- HTML | br Tag
- HTML | th Tag
- HTML tr Tag
- HTML | <dd> Tag
- HTML <ins> Tag
- HTML | bdo Tag
- HTML | <!--...--> Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : nidhi_biet