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.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top