HTML - <frame> Tag


Advertisements


Description

The HTML <frame> tag is used to specify each frame within a frameset tag. This tag is not supported in HTML5.

Example

Live Demo
<!DOCTYPE html>
<html>

   <head>
      <title>HTML frame Tag</title>
   </head>

   <frameset cols = "200, *">
      <frame src = "/html/menu.htm" name = "menu_page" />
      <frame src = "/html/main.htm" name = "main_page" />
      
      <noframes>
         <body>
            Your browser does not support frames.
         </body>
      </noframes>
      
   </frameset>
	
</html>

This will produce the following result, refer the image given below. The left frame is menu.htm and the right one is main.htm −

Specific Attributes

The HTML <frame> tag also supports the following additional attributes −

Attribute Value Description
frameborder 0 or 1 Specifies whether or not to display border around the frame.
marginheight pixels Allows you to specify the width of the space between the left and right of the frame's borders and the frame's content. The value is given in pixels. For example marginwidth = "10".
marginwidth pixels Specifies the margin, in pixels, between the frame's contents and it's left and right margins.
name frame name Name of the frame.
noresize noresize When set to noresize the user cannot resize the frame.
scrolling yes
no
auto
Determines scrollbar action.
src URL Location of the frame contents file.

Browsers Supported

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

html_tags_reference.htm

Advertisements