HTML frameborder attribute
frameborder
The purpose of the HTML frameborder attribute is to specify whether or not to display a border around a frame.
The value of this attribute can be set to “1” or “0”.
Supported elements
HTML frameborder attribute supports frame and iframe elements.
Syntax
<frame frameborder="value" >.....</frame>
Type of value
1 or 0.
Value
Value | Description |
---|---|
1 | To display a border around the frame / iframe. Default value. |
0 | Not to display a border around the frame/ iframe. |
Default value
1
Supported doctypes
HTML 4.01 frameset.
Example of HTML frameborder attribute with frame
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML frameborder attribute with frame</title>
</head>
<frameset cols="20%,*,20%">
<frame src="frame_left.htm" frameborder="0" />
<frame src="frame_center.htm" frameborder="0" />
<frame src="frame_right.htm" frameborder="0" />
</frameset>
</html>
Result

View this example in a separate browser window
Example of HTML frameborder attribute with frame
Example of HTML frameborder attribute with iframe
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML frameborder attribute with iframe</title>
</head>
<body>
<iframe src="frame_left.htm" frameborder="0"></iframe>
</body>
</html>
Result

View this example in a separate browser window
Example of HTML frameborder attribute with iframe
Previous: HTML frame attribute
Next: HTML headers attribute
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join