What is FRAME Tag in HTML ?

It is used to include the web page to into the frame. It is Empty type of Tag.

Attributes: 

    • src: It is used to specify the path of the web page or the source, e.g. src=”c:\html\a.htm!”.

    • name: It is used to assign a name to the frame. It is useful in Anchor tag to set target. e.g. name= “main”.

    •  scrolling: It is used to specify whether scroll bars are to be displayed or not. Its values are “auto, yes and no”. Its default value is auto. e.g. scrolling=”yes”.

    • marginwidth: It is used to specify in pixels the width of the left and the right margins for a frame, e.g. marginwidth=”10″.

    • marginheight: It is used to specify in pixels the height of the top and bottom margins for a frame. e.g. marginheight=”10″.

Example:

<HTML>
<HEAD>
<TITLE>Frames</TITLE>
</HEAD>
<HEAD> <FRAMESET cols=”**”>
<FRAME src=”a.html” name=”left” scrolling=”yes” marginwidth=”10″ marginheight=”10″ noresize>
<FRAME src=”b.html”> </FRAMESET>
</HTML>

according to above example, a.html will be displayed in frame named “left” and it will have a scroll bar. page s margin will be 10 pixels in width and 10 pixels in height and it cannot be resized.

Leave a Comment