HTML <iframe> scrolling Attribute
Last Updated :
12 Jan, 2024
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Â
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
html
<!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:
 Example 2: the implementation of <iframe> scrolling with no scrolling attribute.
HTML
<!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
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...