The HTML code that follows can be used to create a webpage that is divided into distinct frames. For frames templates that are compatible with HTML5, you can also look at these templates.
Frames Compliant with HTML5
Frames (in the conventional sense) are not supported in HTML since HTML5 was formally recommended. The <frameset> and <frame> elements were once used to create frames, but HTML no longer supports them.
You must either use iframes (i.e., the <iframe> tag) or CSS to provide the "frame" functionality in order to create frames that are HTML5 compliant.
In the majority of cases, the CSS approach is most likely the superior option. For every frame, a <div> element—or any other appropriate element—must be used. Next, any "overflowing" content on an element is hidden using the CSS overflow property, and scrollbars are enabled so the user can scroll. This can be accomplished by setting overflow:auto or overflow:scroll. Additionally, you can set overflow:hidden to stop scroll bars from showing.
The contents of every "frame" created using this technique must truly be contained in a single file. Therefore, you only need to create one HTML file instead of making separate files for each frame and the frameset (as one would do with the old method of creating frames).
Here is a small example to illustrate the idea:
<div style="overflow:auto;width:50px;height:120px;background:#ccc;float:left;left:0;top:0;padding:3px;">
<p>Left Frame.</p>
</div>
<div style="overflow:auto;width:150px;height:120px;background:#eee;float:left;left:200px;top:0;padding:3px;">
<p>Right Frame.</p>
<p>This div has more content than it can hold. Therefore, scrollbars appear to allow the user to scroll. To create a frames based website, simply create a div for each frame, and specify 'scroll', 'auto', or 'hidden' to determine whether the user can scroll or not.</p>
</div>
element must be positioned on the page using CSS.
For a collection of pre-made templates that are compatible with HTML5 using the aforementioned technique, check out these frames templates.
That is Great! You have now learnt to create Frames HTML Code in Blog. Please feel free to leave any constructive feedback, suggestions or questions in the comments and I'll get back to you as quick as I can with concrete solutions. Want to know more about blog writing, please mention. I will make a tutorial on.
Thankyou
BashTec
Read Also:
Tags
Frames HTML Code