HTML <object> width Attribute Last Updated : 12 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report The HTML <object> width attribute is used to specify the horizontal dimension of the embedded object, defining the width of the displayed content within the webpage. Syntax: <object width="pixels">Attribute Values: pixels: It holds the width of the object in terms of pixels.The below example illustrates the <object> width attribute in HTML: HTML <object> width attribute ExampleExample: This example uses object width attribute to set the object width. HTML <!DOCTYPE html> <html> <head> <title>HTML object width Attribute</title> </head> <body style="text-align: center"> <h2>HTML object width Attribute</h2> <object id="myobject" width="400" height="200" data= "https://media.geeksforgeeks.org/wp-content/uploads/geek-8.png" > </object> </body> </html> Output: Explanation: Above example utilizes the <object> tag with the width attribute set to 400 pixels and the height attribute set to 200 pixels to embed an image.The data attribute specifies the image source URL for display within the webpage.HTML object width attribute Use-Case1. How to specify the width and height of the object in HTML5?In HTML5, use the width and height attributes within the <object> tag to specify the horizontal and vertical dimensions of embedded content, respectively, defining its display size. Supported BrowsersThe browser supported by HTML <object> width attribute are listed below: Google ChromeEdge Internet Explorer Firefox OperaSafari Comment M manaschhabra2 Follow 1 Improve M manaschhabra2 Follow 1 Improve Article Tags : Web Technologies HTML HTML-Attributes Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like