Open In App

HTML frameset Tag

The <frameset> tag in HTML is used to define the frameset. The <frameset> element contains one or more frame elements. It is used to specify the number of rows and columns in frameset with their pixel of spaces. Each element can hold a separate document. 

Note: The <frameset> tag is not supported in HTML5.



Syntax: 

<frameset cols = "pixels|%|*">

Attributes: The list of frameset attributes are given below: 
 



Below examples illustrate the <frameset> element in HTML:
Example 1: 




<!DOCTYPE html>
<html>
    <head>
        <title>frameset attribute</title>
    </head>
     
    <!-- frameset attribute starts here -->   
    <frameset rows = "20%, 60%, 20%">
        <frame name = "top" src = "attr1.png" />
        <frame name = "main" src = "gradient3.png" />
        <frame name = "bottom" src = "col_last.png" />
        <noframes>
            <body>The browser you are working does not
                                  support frames.</body>
        </noframes>
    </frameset>
    <!-- frameset attribute ends here -->
</html>                               

Output: 
The above example basically used to create three horizontal frames: top, middle, and bottom using row attribute of frameset tag, and the noframe tag is used for that browser that doesn’t support noframe. 
 

Example 2: 
 




<!DOCTYPE html>
<html>    
    <head>
        <title>frameset attribute</title>
    </head>
         
    <frameset cols = "30%, 40%, 30%">
        <frame name = "top" src = "attr1.png" />
        <frame name = "main" src = "gradient3.png" />
        <frame name = "bottom" src = "col_last.png" />        
        <noframes>
            <body>The browser you are working does
            not support frames.</body>
        </noframes>
    </frameset>
</html>

Output: 
The above example basically used to create three vertical frames: left, center, and right using col attribute of frameset tag. 
 

Supported Browsers: 

 


Article Tags :