diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-31 07:48:32 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-31 07:48:32 +0000 |
commit | 3af71ccb085ebeb83d84e6e1f29b3fcb8a4ba650 (patch) | |
tree | 9ae52ae0d6cff95249aaf4071022d17c93375567 /docs | |
parent | 15a004b54b7ee29c5409d871b9c0f26fcad8b525 (diff) | |
download | zetacomponents-graph-3af71ccb085ebeb83d84e6e1f29b3fcb8a4ba650.zip zetacomponents-graph-3af71ccb085ebeb83d84e6e1f29b3fcb8a4ba650.tar.gz |
- Fixed issue #10858: Document on how to embed the SVG graphs in an HTML
document
Diffstat (limited to 'docs')
-rw-r--r-- | docs/tutorial.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/tutorial.txt b/docs/tutorial.txt index eb818c2..b043852 100644 --- a/docs/tutorial.txt +++ b/docs/tutorial.txt @@ -835,6 +835,47 @@ text in the resulting image, which will sometimes fail slightly. .. [1] Abobe SVG plugin: http://www.adobe.com/svg/viewer/install/main.html .. [2] Corel SVG plugin: http://www.corel.com/servlet/Satellite?pagename=CorelCom/Layout&c=Content_C1&cid=1152796555406&lc=en +Embedding SVG in HTML +~~~~~~~~~~~~~~~~~~~~~ + +If you want to embed SVGs in HTML there are several ways to do so. With XHTML +you may inline the content of the SVG in your HTML, as both are just XML. You +need to keep correct namespacing in mind here. Opera and Firefox will support +this technique. + +Another way to reference SVGs in your HTML markup, is to use the object +element like following example shows. + +:: + + <object date="path/to/image.svg" type="image/svg+xml"> + You need a browser capeable of SVG to display this image. + </object> + +You may optionally specify width and height as attributes in the options +element. With this standard conform way, the drawback again is, that +Microsofts Internet Explorer does not support this. With browsers from the +Internet Explorer series you may use the proprietary embed element. + +:: + + <embed src="path/to/image.svg"></embed> + +You may not specify an alternative text here, and this will not work with +Opera and Firefox. If need to support all browsers you may use one of the +common switches to distinguish between browsers. + +:: + + <!--[if IE]> + <embed ... /> + <![endif]--> + <![if !IE]--> + <object ... /> + <![endif]--> + +Another alternative for embedding SVGs in your HTML would be using iframes. + GD driver --------- |