Vecteezy Editor Try our new FREE SVG editor! Designed to allow anyone to customize Vecteezy content before they download it, or create beautiful vector designs from scratch directly in your browser.
- It was brought up at the SVG Summit the other day, wouldn’t it be nice when working with SVG to be able to work with it both ways at once? See and edit the code, and see the results visually; See and edit the visual shapes, and see the code change; There might not be the perfect one true tool, but there are certainly some ideas getting there!
- Snap.svg is designed for modern browsers and therefore supports the newest SVG features like masking, clipping, patterns, full gradients, groups, and more. Inject life into your SVG With a rich animation library and easy event handing, Snap.svg lets you bring your SVG to life.
SVG defines vector-based graphics in XML format.
What is SVG?
- SVG stands for Scalable Vector Graphics
- SVG is used to define graphics for the Web
- SVG is a W3C recommendation
The HTML <svg> Element
The HTML
<svg>
element is a container for SVG graphics.SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
Browser Support
The numbers in the table specify the first browser version that fully supports the
<svg>
element.Element | |||||
---|---|---|---|---|---|
<svg> | 4.0 | 9.0 | 3.0 | 3.2 | 10.1 |
SVG Circle
Example
<!DOCTYPE html>
<html>
<body>
<svg width='100' height='100'>
<circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='yellow' />
</svg>
</body>
</html>
Try it Yourself »<html>
<body>
<svg width='100' height='100'>
<circle cx='50' cy='50' r='40' stroke='green' stroke-width='4' fill='yellow' />
</svg>
</body>
</html>
SVG Rectangle
![Html Svg Editor Online Html Svg Editor Online](https://www.nethruworks.com/wp-content/uploads/2014/07/svg-edit2-1024x739.png)
Example
<svg width='400' height='100'>
<rect width='400' height='100' />
</svg>
Try it Yourself »<rect width='400' height='100' />
</svg>
SVG Rounded Rectangle
Example
<svg width='400' height='180'>
<rect x='50' y='20' rx='20' ry='20' width='150' height='150'
/>
</svg>
Try it Yourself »<rect x='50' y='20' rx='20' ry='20' width='150' height='150'
/>
</svg>
SVG Star
Example
<svg width='300' height='200'>
<polygon points='100,10 40,198 190,78 10,78 160,198'
/>
</svg>
Try it Yourself »<polygon points='100,10 40,198 190,78 10,78 160,198'
/>
</svg>
SVG Logo
Example
<svg height='130' width='500'>
<defs>
<linearGradient x1='0%' y1='0%' x2='100%' y2='0%'>
<stop offset='0%' />
<stop offset='100%' />
</linearGradient>
</defs>
<ellipse cx='100' cy='70' rx='85' ry='55' fill='url(#grad1)' />
<text fill='#ffffff' font-size='45' font-family='Verdana' x='50' y='86'>SVG</text>
Sorry, your browser does not support inline SVG.
</svg>
Try it Yourself »<defs>
<linearGradient x1='0%' y1='0%' x2='100%' y2='0%'>
<stop offset='0%' />
<stop offset='100%' />
</linearGradient>
</defs>
<ellipse cx='100' cy='70' rx='85' ry='55' fill='url(#grad1)' />
<text fill='#ffffff' font-size='45' font-family='Verdana' x='50' y='86'>SVG</text>
Sorry, your browser does not support inline SVG.
</svg>
Differences Between SVG and Canvas
SVG is a language for describing 2D graphics in XML.
Canvas draws 2D graphics, on the fly (with a JavaScript).
SVG is XML based, which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element. One switch 1 6 3.
In SVG, each drawn shape is remembered as an object. If attributes of an SVG object are changed, the browser can automatically re-render the shape.
Canvas is rendered pixel by pixel. In canvas, once the graphic is drawn, it is forgotten by the browser. If its position should be changed, the entire scene needs to be redrawn, including any objects that might have been covered by the graphic.
Comparison of Canvas and SVG
The table below shows some important differences between Canvas and SVG:
Canvas | SVG |
---|---|
|
|
SVG Tutorial
To learn more about SVG, please read our SVG Tutorial.
Why SVG (and Snap)?
SVG is an excellent way to create interactive, resolution-independent vector graphics that will look great on any size screen. And the Snap.svg JavaScript library makes working with your SVG assets as easy as jQuery makes working with the DOM.
![Acknowledgementslists open source projects used in svg-edit. Acknowledgementslists open source projects used in svg-edit.](https://cdn.pixabay.com/photo/2013/07/12/13/45/button-147230_960_720.png)
Modern features for modern browsers
Snap.svg is designed for modern browsers and therefore supports the newest SVG features like masking, clipping, patterns, full gradients, groups, and more.
Inject life into your SVG
With a rich animation library and easy event handing, Snap.svg lets you bring your SVG to life.
Source agnostic
Of course you can generate SVG with Snap, but you can also use Snap to work with SVG generated from tools like Adobe Illustrator, Inkscape, or Sketch. You can even load strings of SVG asynchronously and query out the pieces you need in order to turn SVG files into sprite sheets.
Open-source and free
Snap.svg is available under an Apache 2 license which means it’s completely open-source, and completely free.
Getting Started with Snap
Got questions? Ask them on the Snap.svg forums.
Get Snap now
Acknowledgementslists Open Source Projects Used In Svg-edit.
Download Version 0.5.1Html Svg Editor Online Photo Editor
You can also clone Snap from GitHub.