<frame> HTML Tag

In this article I will discuss the frame tag of HTML.
  • 1496

The HTML frame tag is used to specify each frame within a frameset. For example, you can have a left frame for navigation and a right frame for the main content. For each frame, you specify the frame with the frame tag. This tag defines one particular window (frame) within a <frameset>.Each <frame> in a <frameset> can have different attributes, such as border, scrolling, the ability to resize, etc.

Example

In this example I make four html files frame.html in which I gives the frames of frame1.html,frame2.html,and frame3.html pages.
 
The code for frame.html file.

<html>

<head>

    <title>HTML FRAME</title>

</head>

<frameset cols="75%,*">

     <frameset rows="50%,50%">

        <frame style="background-color:blue" src="frame1.html"></frame>

        <frame style="background-color:gray" src="frame2.html"></frame>

     </frameset>

  <frame style="background-color:red" src="frame3.html"></frame>

    </frameset>

</html>

 

The code for frame1.html file
 

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        Hi!!!!How are you?</h1>

</body>

</html>


The code for frame2.html file
 

<html>

<head>

    <title></title>

</head>

<body>

    <h3>

        Have a nice day!!!!</h3>

</body>

</html>

 

The code for frame3.html file

 

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        Gud Morning</h1>

</body>

</html>

 

Output

frame.jpg

 

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

© 2018 DotNetHeaven. All rights reserved.