How to use .svg files in a webpage?

Parastar picture Parastar · Jan 6, 2010 · Viewed 90k times · Source

I want to know how can one actually use a .svg file In a web page?

Answer

Erik Dahlström picture Erik Dahlström · Jan 6, 2010

See svgweb quickstart and the svgweb project homepage for something that works in all browsers including IE (requires flash plugin).

There are many ways to include an existing svg file:

  • <img src="your.svg"/>
  • <object data="your.svg"/>
  • <iframe src="your.svg"/>
  • <embed src="your.svg"/>
  • <div style="background:url(your.svg)">...</div>