Open In App

HTML | <Iframe> frameborder Attribute

Improve
Improve
Like Article
Like
Save
Share
Report

The HTML Iframe frameborder Attribute is used to specify whether or not to display the border around the content of an <Iframe> Element.

Syntax:

<iframe frameborder="1 | 0">

Attribute Values:

  • 0: It has a Default value. It sets the border on one state.
  • 1: It sets the border on-off state.

Note: This attribute does not support in HTML5 as a replacement you can use CSS.

Below program will illustrate HTML Iframe frameborder Attribute:
Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML <Iframe> frameborder Attribute
    </title>
</head>
  
<body>
  <center>
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
    <h2>
        HTML Iframe frameborder Attribute
    </h2>
  
    <p>Content goes here</p>
  
    <iframe src=
            height="300" 
            width="400" 
            marginheight="40" 
            frameborder="0">
    </iframe>
  </center>
  
</body>
  
</html>


Output:

Supported Browsers: The browsers supported by HTML <Iframe> frameborder Attribute are listed below:

Similar Reads