HTML | <frame> longdesc Attribute

Last Updated : 12 Jul, 2025

The HTML <frame> longdesc Attribute is used to specify a page which contains the long description of the content of the frame.
 

Syntax:  

<frame longdesc="URL"> 


Attribute Values: 

  • URL: It contains the value i.e URL which specifies the page which contains the long description of the content of the frame.
    1. An absolute URL:It points to another website.
    2. A relative URL: It points to a file within a website.


Example: 

index.html
<!DOCTYPE html>
<html>

<head>
    <title>HTML frame longdesc Attribute</title>
</head>
<frameset cols="30%, 40%, 30%">
    <frame name="top"
           src="https://www.geeksforgeeks.org/community/"
           noresize="noresize" 
           longdesc="gfg.txt" />
    <frame name="main" 
           src="https://www.geeksforgeeks.org/community/" 
           marginwidth="30" />
    <frame name="bottom" 
           marginwidth="30" 
           src="https://www.geeksforgeeks.org/community/"
           marginwidth="40" />
</frameset>
</html>

Note:  The HTML iframe syntax is correct, the https://www.geeksforgeeks.org/community/ website does not allow itself to be embedded in iframes on other domains. This is due to protective headers (X-Frame-Options, CSP) that prevent clickjacking and preserve content security. As a result, the iframe appears broken, even though the code itself is valid. you can use some other website link to check the output


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

Comment