

You see code iframes commonly used on websites that need to include external content like a Google map or a video from YouTube. Content attributes: Global attributes src - Address of the resource srcdoc - A document to render in the iframe name - Name of nested navigable sandbox - Security rules for nested content allow - Permissions policy to be applied to the iframe's contents allowfullscreen - Whether to allow the iframe's contents to use requestFullscreen() width - Horizontal dimension height - Vertical dimension referrerpolicy - Referrer policy for fetches initiated by the element loading - Used when determining loading deferral Accessibility considerations: For authors. In essence, an iframe is another browser window set inside your web page. Tag omission in text/html: Neither tag is omissible. Contexts in which this element can be used: Where embedded content is expected. As mentioned, we use iframe to embed an HTML document onto a page. With websites becoming more complex, it only makes sense that WordPress users would need a means of displaying third-party content on their own pages.

However, these two elements do slightly different things. An inline frame is used to embed another document within the current HTML document.