Junior
What is an iframe and what is it used for?
sobes.tech AI
Answer from AI
The <iframe> (Inline Frame) element creates an embedded (floating) frame that can load content from another source (usually another URL) into the current HTML document.
It is used for:
- Embedding content from other sites: maps (Google Maps), videos (YouTube), social media widgets, third-party forms.
- Isolating content: the iframe content operates in a separate environment, isolated from the parent page, which enhances security.
- Creating independent blocks: allows developing and managing separate parts of a web page independently.
Example of usage:
<iframe src="https://www.example.com" width="600" height="400">
Your browser does not support iframe.
</iframe>