HTML <iframe> scrollingAttribute

HTML iframe 标签参考手册HTML <iframe> Tag

Example

<iframe> with a scrollbar:

<iframe src="http://www.w3cschool.cc/" width="200" height="200" scrolling="yes">
</iframe>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the scrolling attribute.


Definition and Usage

HTML5 does not support the <iframe> scrolling attribute. Use CSS instead.

The scrolling attribute specifies whether to display scrollbars in the <iframe>.

By default, if the content exceeds the <iframe>, scrollbars will appear in the <iframe>.


Syntax

<iframe scrolling="auto|yes|no">

Attribute Values

Value Description
auto Scrollbars appear when needed (default value).
yes Always display scrollbars (even if not needed).
no Never display scrollbars (even if needed).


HTML iframe 标签参考手册HTML <iframe> Tag Other Extensions