<frameset> HTML Tag

In this article I will discuss the frameset tag of HTML.
  • 2536

The HTML frameset tag is used to separate the window into frames.We can divide a column into number of rows in the frameset. For this we have to use rows attribute with the frameset tag. The <frameset> element holds one or more <frame> elements. Each <frame> element can hold a separate document.

Example

In this example I make Three html files frame.html in which I gives the frames of frame1.html,frame2.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>

<frameset rows="40%,60%">

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

        <frame style="background-color:yellow" src="frame4.html"></frame>

</frameset>

    </frameset>

</html>


The code for frame1.html file

 

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        Names of Input devices</h1>

    <ul type="square">

        <li>Keyboard</li>

        <li>Mouse</li>

        <li>Touch pad</li>

    </ul>

</body>

</html>

The code for frame2.html file

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        Name of output devices</h1>

    <ul type="circle">

        <li>Monitor</li>

        <li>Printer</li>

    </ul>

</body>

</html>

The code for frame3.html file

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        HTML</h1>

    <br />

    <dfn>Hypertext Markup Language</dfn>

</body>

</html>

The code for frame4.html file

<html>

<head>

    <title></title>

</head>

<body>

    <h1>

        HTTP</h1>

    <br />

    <dfn>Hypertext Transfer Protocol</dfn>

</body>

</html>


Output

frameset.jpg
 

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

 

 

© 2020 DotNetHeaven. All rights reserved.