Skip navigation

Inline SVG that Validates

XHTML and SVG are different document types, so it’s not possible to include inline SVG documents in webpages without javascript. However it is possible to use frames to explicitly or implicitly embed SVG documents. The method is similar to embedding flash. The following is the implicit method based on the Flash Satay article.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" >
    <title>Inline SVG Example</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <meta name="robots" content="all" />
    <link rel="shortcut icon" href="favicon.ico" />

    <table border='1' cellpadding='8' cellspacing='0'>
    <td align='center' valign='top'>
    <object type='image/svg+xml' data='example.svg' width='' height=''>

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: