The content you see here is displayed in a div. It was initially loaded into a hidden iframe.

Once the document finished loading into the iframe it called a function in the main document which transferred the content into the div.

In this example the div has a specific height setting. With overflow:auto added to the style specifications for the div, scrollbars appear as needed.

If height were not set, or if it were set to auto, the div would shrink and expand according to the amount of content in the document loaded into it.