Frameset in HTML
Frameset in HTML was used to divide a webpage into multiple sections, allowing multiple HTML documents to be displayed on the same page. However, it is now deprecated in HTML5 and replaced by modern layout techniques like CSS Grid, Flexbox, and <iframe>.
Basic Example
<frameset cols="50%, 50%">
<frame src="page1.html">
<frame src="page2.html">
</frameset>
Frameset with Rows and Columns
<frameset rows="30%, 70%">
<frame src="header.html">
<frameset cols="50%, 50%">
<frame src="left.html">
<frame src="right.html">
</frameset>
</frameset>
Attributes of <frameset>
Attribute | Description | Example |
---|---|---|
cols | Splits screen into vertical sections | <frameset cols="30%, 70%"> |
rows | Splits screen into horizontal sections | <frameset rows="50%, 50%"> |
src | Defines the page to load in a frame | <frame src="home.html"> |
name | Assigns a name to the frame | <frame name="main"> |
scrolling | Enables/disables scrolling (yes , no , auto ) | <frame scrolling="no"> |
noresize | Prevents frame resizing | <frame noresize> |