Logout Developer Knowledgebase Search Adobe Partners Main Adobe Solution Partner Finder Adobe Solution Partner Program Support Developer Knowledgebase Adobe Solution Partner Program Products & Technology Adobe
Developer Knowledgebase

Knowledgebase HomeSVG KB

Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner

Product
SVG
 
Version
3.0
 
Last Edited
09-Mar-2005
 
Document
50565

How To: Embed or Link to SVG files from HTML

Summary
To access an SVG file from a Web page, use the <embed> tag or <a href...> to link to it. Also consider the tradeoffs between the two methods.

Issue
Following are instructions on using SVG code on a Web page

Solution
To Embed:
- save the code with a file name ending in .svg (eg. test.svg)
- add the following html to your Web page
<EMBED SRC="test.svg" WIDTH="1000" HEIGHT="1000">

To Link:
- save the code with a file name ending in .svg (eg. test.svg)
- add the following html to your Web page
<A HREF="test.svg">Click here to open the SVG file</A>

Tradeoffs:
The embed tag forces you to set the height and width of the displayed SVG graphic. If you want to modify the size of the SVG graphic using JavaScript, then link to it. If you want to set the background color of the browser window that is visible around the SVG graphic, you have to use the embed tag on an HTML page and set the background color of the HTML page. You can set the background of the SVG graphic by placing a large colored rectangle at its bottommost layer.

back to top
Was this Knowledgebase document helpful? Yes  No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit: http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy