Pages

Instruction of Frames


 Frames are the subwindows of a web browser window and each frame can display one HTML document. Frames enable you to view more than one HTML document in a web browser window. For examlpe, in a browser window, one frame can display a static banner, second frame can display a navigation menu and third frame can display an HTML document based on the selected menu from the second frame.

Creating Frames
You use the <FRAMESET> tag to create frames in frame set..Which consists of multiple frames.A border named frame border divides the frames in a frameset .The <FRAMESET> tag creates a frameset and multiple frames in the frameset.The <FRAMESET> tag creates multiple frames by dividing a frameset into rows and columns .Row is horizontal frame and a column represent a vertical frame .You can use the cols and rows attributes of the <FRAMESET>.
 <FRAMESET> attribute tag :
COLS :   Specifies the number of vertical frames and their width
ROWS:    Specifies the number of horizontal frames and their height
BORDER :     Specifies the width of frame border.
BORDER COLOR: Specifies the color of frame borders .

You can use the <FRAME> tag to  inside the  <FRAMESET>tag.You can use various attribute in <FRAME>.

BORDERCOLOR  :Specifies the border color of the frame.
FRAMEBORDER  :Indicates whether the frame contains border or not
MARGINHEIGHT :Specifies the height for the top and bottom margins of the frame.
MARGINWIDTH  :Specifies the width for the left and right margins of the frame.
NAME                     :Specifies the name of the frame
NORESIZE             :Specifies that an end user cannot resize the frame
SCROLLING          :Indicates whether the frame contains scroll bar.  
SRC                          :Specifies the URL of the document to be displayed in the frame

Program of  Row 

<html>
<head>
<title>This is the frame set program</title>
<<Frameset rows="20%,80% " Border=10>
<frame src="file.html" name="frame1">
<frame src="file2.html name="frame2">
</frameset>
</html>

 Program of  Nested Frame

<html>
<head>
<title>This is the frame set program</title>
<<Frameset cols="20%,* ">
<frame src="file.html" name="frame1">
<<Frameset  rows="30%,* ">
<frame src="file2.html name="frame2">
<frame src="file3.html name="frame3">
</frameset>
</frameset>
</html>

0 comments: