A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/how-to-specify-the-width-and-height-of-the-object-in-html5/ below:

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

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

Last Updated : 01 Jun, 2023

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.

Syntax:

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

Attributes:

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

HTML
<!DOCTYPE html>
<html>
<head>
    <title>
        How to specify the width and
        height of the object in HTML5?
    </title>
</head>
<body>
    <h1 style="color: green;">
        GeeksforGeeks
    </h1>
    <h3>
        How to specify the width and
        height of the object in HTML5?
    </h3>
    <object data=
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/Geek_logi_-low_res.png"
            width="450px" 
            height="150px">
        GeeksforGeeks
    </object>
</body>
</html>

Output:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4