HTML frame Tag
-
The <frame> tag defines frame window. The <frameset> tag holds one or more <frame> elements.
-
HTML <frameset> tag used to split the browser window in several individual frames that can contain a separate HTML web document. The <frame> tag used improve appearance and usability of a site.
-
HTML <frame> tag remove in HTML5 specification.
Example
frame_1.html
<html>
<body style="background-color:#ff9900;">
<h2 align="center">First frame (frame_1.html)</h2>
</body>
</html>
frame_2.html
<html>
<body style="background-color:#ffcc00;">
<h2 align="center">Second frame (frame_2.html)</h2>
</body>
</html>
frame_example1.html
<html>
<head>
<title>Frameset Example 1<title>
</head>
<frameset rows="35%, 65%">
<frame src ="frame_1.html" />
<frame src ="frame_2.html" />
</frameset>
</html>
<frame> Tag Attributes
HTML <frame> tag support following specific attributes. All following attributes has been removed in HTML5.
Attributes | Value | Description |
---|---|---|
frameborder | 0 1 |
Specify whether display a border or not. |
longdesc | url | Specify URL link to another page having a long description of the frame contents. |
marginheight | pixel_size | Specify the top and bottom margins of frame. |
marginwidth | pixel_size | Specify the left and right margins of frame. |
name | name | Specify the frame name. |
noresize | noresize | Specify that prevents to resize frame. |
scrolling | auto yes no |
Specify weather scrollbars should be display or not. |
src | url | Specify web document URL to show in a frame. |
Global Attributes
HTML <frame> tag support following global attributes.
Attributes | Value | Description |
---|---|---|
id | unique_name | Declared unique id for an element. |
class | class_name | Declared one or more classnames for an element. |
style | styles | CSS inline styles specify an element. |
title | title | Specify extra details of element contain, this will display as a "tooltip" for an elements. |
Event Attributes
HTML <frame> tag does not support any event attributes.
Browser Compatibility
- Google Chrome
Yes - Mozilla Firefox
Yes - Microsoft Edge
Yes - Opera
Yes - Safari
Yes