HTML iframe width attribute
Examples
Specify the height and width of 200 pixels <iframe>:
<iframe src="http://www.w3cschool.cc/" width="200"
height="200"></iframe>
try it"
Browser Support
All major browsers support width attribute.
Definition and Usage
Attribute specifies the width <iframe> width in pixels.
Differences between HTML 4.01 and HTML5
In HTML 4.01, the width should be defined in pixels or as a percentage of the containing element as a unit. In HTML5, the width value must be in pixels.
grammar
<iframe width="pixels">
Property Value
值 | 描述 |
---|---|
pixels | 以像素为单位的宽度(比如 "100px" 或者只是 "100")。 |
HTML <iframe> tag