<frame> and its frameborder attribute are obsolete. The examples below are for maintaining old code.The historical frameborder attribute controlled whether a border appeared around a frame in a frameset.
<frameset cols="50%,50%">
<frame src="frame1src.html" frameborder="0">
<frame src="frame2src.html" frameborder="0">
</frameset>
For a current <iframe>, control the visible border with CSS rather than old frame presentation attributes.
<iframe class="embedded-page" src="example.html" title="Example page"></iframe>
.embedded-page {
border: 0;
}
Should I use frameborder="0" today?
No for new HTML. Use CSS on an iframe when a border needs to be removed.
Does CSS border work on iframe?
Yes. An iframe is a normal element whose outer border can be styled with CSS.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.