Summary -
In this topic, we described about the <frame> tag along with detailed example.
The <frame> tag is not supported in HTML5. To define a window in another window or frameset. The <frame> tag used to define frame within a <frameset>.
The <frameset> can contain multiple frames (<frame>). Each <frame> element can have different attributes and refer to the separate document. There is no end tag required in HTML for <frame> tag.
Syntax -
<frame>.. text here.. </frame>
Optional Attributes -
Attribute | Description | Values |
---|---|---|
Frameborder | Specifies whether frame border displays or not | 01 |
Marginheight | Specifies the top and bottom margins of the frame | Pixels |
Marginwidth | Specifies the left and right margins of the frame | Pixels |
Name | Specifies the name of the frame | Text |
Noresize | Specifies the frame is not resizable | Noresize |
Scrolling | Specifies frame defined is scrollable or not | Auto No Yes |
Src | Specifies the source of the page to show in frame | URL |
Example -
<!DOCTYPE html>
<html>
<head>
<title>Frame example</title>
</head>
<body>
<frameset cols="20%,20%,25%,*">
<frame src="frame1.htm">
<frame src="frame2.htm">
<frame src="frame3.htm">
<frame src="frame4.htm">
</frameset>
</body>
</html>