SVG files can be embedded into HTML documents with the <embed>
tag, the <object> tag, or the <iframe> tag.
SVG in HTML Pages
Below you should see three different methods on how to embed SVG files into HTML pages.
Using the <embed> Tag
The <embed> tag is supported in all major browsers, and allows
scripting.
Note: The Adobe SVG Viewer recommends that you use the EMBED tag when
embedding SVG in HTML pages! However, if you want to create valid XHTML, you
cannot use <embed> - The <embed> tag is not listed in any HTML specification.
Note: The pluginspage attribute points to an URL for the plugin download.
Tip: Internet Explorer supports an additional attribute, wmode="transparent",
that let the HTML page background shine through.
Using the <object> Tag
The <object> tag is an HTML4 standard tag and is supported in all newer browsers.
The disadvantage is that it does not allow scripting.
Note: If you have installed the latest version of Adobe SVG Viewer,
SVG files will not work when using the <object> tag (at least not in
Internet Explorer)!
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
W3Schools is for training only. We do not warrant the correctness of its content.
The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy. Copyright 1999-2009 by Refsnes Data. All Rights Reserved.