O'Reilly logo

Designing SVG Web Graphics by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the <object> Element

The <embed> element was deprecated by the W3C in HTML 4, although, as you’ve seen in earlier examples, the element still continues to perform its function, even if you have to resort to the use of slightly unorthodox syntax to achieve zero margins cross-browser. The element now preferred by W3C for displaying SVG and other objects on an HTML or XHTML Web page is the <object> element. However, its use is fraught with practical issues and difficulties.

First, Figure 10.06 shows what happens if you use the <object> element just as you used the <embed> element for the first example.

Figure 10.06. Using the <object> element in Internet Explorer causes the loss of a little of the SVG image.

In Figure 10.06, you can see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required