# iframes — HTML

Source: https://www.geekswithgeeks.com/en/html/html-iframes

> Embedding another page inside yours.

## Embedding content

An `<iframe>` embeds a whole separate document — a map, a video, another site.

```html
<iframe src="https://maps.example.com" width="400" height="300" title="Location map"></iframe>
```

## The sandbox attribute

`sandbox` restricts what an embedded page can do (scripts, forms, popups) — use it for untrusted content.

**Quiz:** What is a common real-world use of an iframe?

- [x] Embedding a YouTube video or map
- [ ] Styling text
- [ ] Validating a form

*Answer:* Embedding a YouTube video or map. iframes commonly embed third-party widgets like videos, maps and payment forms.
