maxdesign.com.au

Published:

Are you aware that the follow attributes have now been deprecated from use within the <iframe>?

But what happens when you want to remove the default border from an iframe? The best option is some simple CSS:

iframe {
  border: 1px solid #000;
}

Using the title attribute

While the title attribute should be avoided in most cases, it can be applied to the <iframe> element to label its content for assistive technologies.

<iframe title="Concise description of embedded content">
</iframe>

The seamless attribute

Before the seamless attribute was dropped, it was intended to make the <iframe> “seamlessly” look like it is part of the parent document. The HTML5 spec stated:

“it indicates that the iframe element’s browsing context is to be rendered in a manner that makes it appear to be part of the containing document (seamlessly included in the parent document).”