An iframe (short for inline frame) is an HTML element that embeds another webpage directly within the current one — commonly used for embedding a YouTube video, a Google Map, or a form built on an outside platform, without needing to leave the page it's placed on.
Common Uses on a WordPress Site
- Embedding YouTube or Vimeo videos
- Displaying an interactive Google Map
- Embedding forms from outside platforms like Typeform or Calendly
- Showing payment widgets or booking calendars from third-party tools
Adding One in WordPress
The Gutenberg editor's dedicated Custom HTML block, or its built-in Embed blocks for popular services, both allow an iframe to be added without touching any code directly — pasting a YouTube link, for instance, will often auto-generate the correct embed automatically.
A Few Things Worth Knowing
- Iframes can measurably slow down a page if too many are loaded at once
- They can pose security risks if pointed at an untrustworthy source
- Lazy-loading an iframe helps limit its impact on page speed
- Content inside an iframe is generally invisible to search engines, so it shouldn't be relied on for SEO-critical text