VOOZH about

URL: https://www.geeksforgeeks.org/html/html-iframe-width-attribute/

⇱ HTML <iframe> width Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <iframe> width Attribute

Last Updated : 27 May, 2026

The width attribute is used to specify the width of an <iframe> element. It controls the horizontal size of the embedded frame on a webpage.

  • Defines the width of the <iframe> in pixels.
  • Commonly used with the height attribute for proper frame dimensions.
  • The <iframe> tag is used to embed external content like webpages, videos, and maps.

Syntax: 

<iframe width="pixels">

Attribute Values: The pixels value specifies the width of the iframe in pixels.

Note: The iframe content may not load because some websites block embedding for security reasons.

Comment
Article Tags: