The HTML <iframe> scrolling Attribute is used to specify whether the scrollbar will be displayed or not in the <Iframe> Element. Basically, the scrollbar is used when the content is larger than the Iframe Element.
Note: This attribute has been DEPRECATED and is no longer recommended.
Syntax
<iframe scrolling="auto | yes | no">
Attribute Values
Attribute Values |
Description |
---|---|
auto |
It has a default value. The scrollbar appears when needed. |
yes |
This value shows the scrollbar in the Iframe Element. |
no |
This value does not show the scrollbar in the Iframe Element. |
Example: the implementation of <iframe> scrolling Attribute
<!DOCTYPE html> < html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport"
content = "width=device-width, initial-scale=1.0" >
< title >Document</ title >
< style >
body {
text-align: center;
}
</ style >
</ head >
< body >
< h1 style = "color: green;" >
GeeksForGeeks
</ h1 >
< h2 >
HTML Iframe scrolling Attribute
</ h2 >
< p >Content goes here</ p >
height = "300" width = "400"
marginwidth = "50" scrolling = "yes" >
</ iframe >
</ body >
</ html >
|
Output:
<!DOCTYPE html> < html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport"
content = "width=device-width, initial-scale=1.0" >
< title >Document</ title >
< style >
body {
text-align: center;
}
</ style >
</ head >
< body >
< h1 style = "color: green;" >
GeeksForGeeks
</ h1 >
< h2 >
HTML Iframe scrolling Attribute
</ h2 >
< p >Content goes here</ p >
height = "300" width = "400"
marginwidth = "50" scrolling = "no" >
</ iframe >
</ body >
</ html >
|
Output:
Supported Browsers:
- Google Chrome 1
- Microsoft Edge 12
- Firefox 1
- Opera 15
- Safari 4