Open In App
Related Articles

How to specify the width and height of the object in HTML5?

Improve Article
Save Article
Like Article

The <object> tag is used to display multimedia like audio, videos, images, PDFs, and Flash in web pages. It can also be used for displaying another webpage inside the HTML page.

The <param> tag is also used along with this tag to define various parameters. Any text that is written within <object> tag and </object> tags is considered an alternative text that appears when the data specified is not supported by the browser. This tag supports all Global and Event attributes of HTML.

In this article, we will see how to set the width and height of an object using the HTML <object>  width, height Attribute.


<object width="value" height="value" >  
   Object value 


  • width: It specifies the width of the object.
  • height: It specifies the height of the object.

Example: In this example, we will see the use <object>  tag.


<!DOCTYPE html>
        How to specify the width and
        height of the object in HTML5?
    <h1 style="color: green;">
        How to specify the width and
        height of the object in HTML5?
    <object data=


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 01 Jun, 2023
Like Article
Save Article
Similar Reads
Complete Tutorials