HTML5 Advanced

Embedded Objects

In this lesson we find out how to embed objects into our HTML and pass parameters to the objects using the <embed>, <object> and <param> HTML tags.

The Embed Element

The <embed> tag is a self closing element used for embedding an external application or interactive content into a HTML document.

The Embedded Object Element

The <object> tag and its' closing </object> tag are used to define an embedded object in a HTML document.

The Object Parameter Element

The <param> tag is a self closing element used within the <object> element to define parameters for the embedded object.

Embed Example


<embed type="video/mp4" src="../pages/HD0405.mp4">

Video courtesy of MovieTOOLS

Embedded Object Example


<object data="../pages/apple.html" 
  type="text/html" 
  width="300" 
  height="200">
</object>

In the above example we are embedding a HTML document within our webpage.

Object Parameter Example


<object data="../pages/HD0405.mp4" 
  type="video/mp4" 
  width="200" 
  height="200">
  <param name="autoplay" value="false">
  <param name="autoStart" value="0">
  alt : <a href="../pages/HD0405.mp4">View Video</a>
</object>

Video courtesy of MovieTOOLS

alt : View Video

Lesson 6 Complete

Play around with the parameters and see the effects on the file. For example setting the autoplay value to true and the autoStart value to 1 will play the video on page load.

Related Tutorials/Quizzes

HTML5 Advanced Tutorials - Media

Embedded Objects Quiz

What's Next?

In the next lesson we investigate inline frames and how to use them within out HTML documents.

HTML5 Reference

The <embed> embedded object tag

The <object> embedded object tag

The <param> object parameter tag