
The <iframe> is a nested browsing environment represented by an HTML element that embeds one HTML page inside of another.
Example 1
<iframe src="https://www.example.com" width="740"
frameborder="0" scrolling="no" id="iframe">
</iframe>
Example 2
<div style="border: 0px solid #c90001; overflow: hidden; margin: 15px auto; max-width: 1920px;">
<iframe scrolling="no" src="https://example.com/forum/" style="border: none; ; height: 1700px; margin-top: -220px; margin-bottom: none; width: 980px;">
</iframe>
</div>
How can you use an iframe to only display a specific portion of a website?
It can be achieved by CSS, here is an example
<div id="my-div">
<iframe src="https://www.example.com" id="my-iframe" scrolling="no"></iframe>
</div>
Here you have one DIV with dimensions 800x400px. Now by moving the IFRAME within it you can position it in the right place.
#my-div
{
width: 800px;
height: 400px;
overflow: hidden;
position: relative;
}
#my-iframe {
position: absolute;
top: -100px;
left: -100px;
width: 1280px;
height: 1200px;
}