Using the object Element to Embed Images

Description

You can use the object element to embed images.


<!DOCTYPE HTML>
<html>
<body>
  <object data="http://www.java2s.com/style/download.png" type="image/png"> </object>
</body><!--  w  w w. j a  v  a2  s.  c o m-->
</html>

Click to view the demo

Image Maps

You can use the object element to create client-side image maps. The usemap attribute can be used to associate a map element with an object element.


<!DOCTYPE HTML>
<html>
<body>
  <map name="mymap">
    <area href="a.html" shape="rect" coords="3,5,68,62"
      alt="A" />
    <area href="b.html" shape="rect" coords="70,5,130,62" alt="B" />
    <area href="c.html" shape="default" alt="default" />
  </map><!--from w  w w  . j  av  a  2  s.c om-->

  <object data="http://www.java2s.com/style/download.png" type="image/png" usemap="#mymap">
  </object>
</body>
</html>

Click to view the demo

At the time of this writing, Google Chrome and Apple Safari do not support this feature.





















Home »
  HTML CSS »
    HTML »




HTML Introduction
HTML Document
HTML Section
HTML Group Content
HTML Text Marker
HTML Table
HTML Form
HTML Embed