XML technologies / SVG / Creating simple SVG graphics / The structure of SVG graphics / Inserting SVG graphics into HTML pages / OBJECT tag versus EMBED tag

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

With SVG Viewer installed, either tag displays SVG. Only the <OBJECT> tag allows alternative contents directly. For the <EMBED> tag, insert a separate <NOEMBED> tag inside the <EMBED> tag. However, <NOEMBED> contents are used only if the browser supports no plug-ins at all. If plug-ins are supported but no SVG plug-in is installed, a placeholder appears.

When using the <EMBED> tag, JavaScript can check for a plug-in and redirect to a page without SVG. This fails when JavaScript is unavailable or disabled. It is therefore better to offer a normal page without SVG by default, test for SVG support there, and redirect only when supported. Better still, test through a server-side script, independently of browser JavaScript support.

Note:
Opera apparently does not properly support the <OBJECT> tag, at least with the MIME type required for SVG. Neither the tag nor its alternative contents are displayed. Opera seems to load the plug-in and graphic without displaying them. Similar behavior occasionally occurs in Netscape Navigator 4.x.

   

 

 

 

back to top