Skip to content
Related Articles

Related Articles

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

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 12 Mar, 2021

The <object> tag used to display multimedia like audios, 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> and </object> tags are considered as 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 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.



<!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=
        width="450px" height="150px">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!