SyntaxStudy
Sign Up
HTML Introduction to HTML iframes
HTML Beginner 3 min read

Introduction to HTML iframes

HTML iframes

The <iframe> element embeds another HTML page inside the current page. It creates an isolated browsing context with its own document and JavaScript scope.

iframes are commonly used to embed videos, maps, and third-party widgets.

Example
<iframe
  src="https://example.com"
  width="600"
  height="400"
  title="Embedded page"
>
  <!-- Fallback for browsers that do not support iframes -->
  <p>Your browser does not support iframes.</p>
</iframe>
Pro Tip

Always add a title attribute to iframes — screen readers use it to describe the embedded content.