[whatwg] How to use SVG in HTML5?

Krzysztof Żelechowski giecrilj at stegny.2a.pl
Wed Jan 23 11:13:01 PST 2008


Dnia 23-01-2008, Śr o godzinie 13:42 +0000, David Gerard pisze:
> Forgive me if this is a simple and obvious question. I note that all
> current browsers (except IE, of course) implement SVG rendering (to a
> better or worse degree). I'd like to be able to drop SVG images into
> an HTML page as easily as I can a JPEG or PNG. I read over the
> recently-released HTML5 draft and couldn't work out how I'd do this.
> 
> What would the HTML to do this look like? What's the equivalent of
> <IMG SRC="foo.jpg"> for foo.svg?

There is none, and there should not be.  
An IMG element is a replacement for inline text 
that can be rendered at the viewer's option, 
an SVG element is an embedded object of its own.  
SVG is too heavyweight 
for the purpose of such tiny presentational enhancements.

Chris




More information about the whatwg mailing list