Spread the love

HTML <object> Tag

The HTML <object> Tag is used to embed multimedia files on a webpage. In which the <object> Tag can include multimedia files such as videos, audios, images, PDFs, Java applets, or any other page of your page.

Note:- If you put text between the <object> and </object> Tags, it will be displayed only if the browser does not support the <object> Tag.

How to Embed Video in HTML Object Tag

To embed video in object tag you need data=” “. to put the URL of the video inside if youtube video to enter the embed code

Example:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        HTML object Tag
    </title>
</head>
<style type="text/css">
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
} 
object{
    border: 3px solid #000;
}
</style>
<body>
<h1 style="margin-bottom: 50px; ">This is HTML object tag Example</h1>    
 
 <object height="250" width="500"   data="https://www.youtube.com/embed/A0AfbKBABNo"></object>  

</body>
</html>

Output:-

How to embed image in the HTML object tag

Example:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        HTML object Tag
    </title>
</head>
<style type="text/css">
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
} 
object{
    border: 3px solid #000;
}
</style>
<body>
<h1 style="margin-bottom: 50px; ">This is HTML object tag Example</h1>    
 
 <object  width="500"   data="https://www.myprograming.com/wp-content/uploads/2021/10/cute-girl.jpg"></object>  

</body>
</html>

Output:-

Attribute:-

  • data
  • form
  • height
  • name
  • type
  • width
  • usemap
  • typemustmatch
  • codebase
  • classid
  • border
  • archive

HTML Param Tag

HTML <param> Tag

The HTML <param> Tag is used to passing parameters to an object that is embedded using the <object> Tag. We can use more than one <param> Tag within a <object> Tag in any order, but each tag must have a name and value attribute and must be placed at the beginning of the content.

The <param> Tag controls the behavior of the <object> Tag by using a separate pair of named value attributes, such as autoplay, controller, etc.

Example:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        HTML param Tag
    </title>
</head>
<style type="text/css">
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
} 
object{
    border: 3px solid #000;
}
</style>
<body>
<h1 style="margin-bottom: 50px; ">This is HTML param tag Example</h1>    
 
 <object height="250" width="500"   data="https://www.youtube.com/embed/A0AfbKBABNo">
     
<param name="controller" value="true">
 </object>    
</body>
</html>

Output:-

Attribute:-

  • Name
  • Value
  • type
  • valuetype

Spread the love

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *