Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section F.2. Referring to an SVG Document in XHTML

F.2. Referring to an SVG Document
in XHTML

This is where things get interesting. First, the <embed> element is deprecated in HTML 4.0, and nonexistent in HTML 4.01 and XHTML. Obviously, this calls for other measures. In place of <embed>, you must use the <object> element. It also needs a height, width, and type, but it uses the data attribute to specify where the SVG document lives. Any content between the opening and closing <object> tags will be displayed if the browser doesn't support the type of object you've specified.

<object data="some_file.svg" width="100" height="200"
    type="image/svg+xml">
    <p>
    Sorry, but your browser doesn't support
    SVG objects. What a pity.
    </p>
</object>


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial