SVG and (X)HTML
The way to do vector graphics on the Web is SVG.
Per http://lists.w3.org/Archives/Public/public-html/2007Nov/0487.html there are numerous ways to use SVG together with (X)HTML:
- For an SVG document that is an image or animated image, without interaction, embedding in is suitable (this is supported in experimental builds of Opera and Safari).
- For an SVG document that is a purely presentational decuration, referencing as a CSS background image is suitable (this is supported in experimental builds of Opera and Safari).
- For an SVG document that supports rich interaction (and has more application-like properties) or that requires scripting interaction between the containing HTML document and the SVG, either <object> or <iframe> is suitable. This works today in the latest shipping versions of Safari, Opera and Firefox. <object> even works in IE with a suitable plugin installed.
- In XHTML, the <svg> element in the SVG namespace is a suitable way to embed any kind of inline SVG directly in the same document. Many are working on a design to let this work in HTML as well. See this research page.