English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <iframe> scrolling attribute

This article introduces the HTML iframe scrolling attribute that specifies whether a scroll bar is displayed in the <iframe>. Usually, when the content is greater than the <iframe>, a scroll bar will appear in the <iframe>.

 HTML <iframe> tag

Online Example

Iframe with scroll bar:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <iframe> scrolling attribute - Basic Tutorial Website oldtoolbag.com</title>
<body>
<p>Always display the scroll bar:/p>
<iframe src="/" width="400" height="250" scrolling="yes">
  <p>Your browser does not support iframes./p>
</iframe>
<p>Do not display the scroll bar:/p>
<iframe src="/" width="400" height="250" scrolling="no">
  <p>Your browser does not support iframes./p>
</iframe>
<p>HTML5 The scrolling attribute is not supported, please use CSS instead.</p>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

The scrolling attribute is deprecated, but still supported in all major browsers.

Definition and Usage

HTML5 The scrolling attribute for <iframe> is not supported. Please use CSS instead.

The scrolling attribute specifies whether a scrollbar is displayed in the <iframe>.
Generally, when the content is larger than the <iframe>, a scrollbar will appear in the <iframe>.

Syntax

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

Attribute Value

ValueDescription
autoDisplay scrollbars when needed (default value).
yesAlways display scrollbars (even if not needed).
noNever display scrollbars (even if needed).
 HTML <iframe> tag