Loading

Quipoin Menu

Learn • Practice • Grow

html / Iframe
interview

Q1. What is an iframe in HTML?
An iframe (inline frame) is used to embed another document within the current HTML page using the <iframe> tag.

Q2. What are common uses of iframes?
Embedding videos from YouTube, maps from Google Maps, external content, advertisements, or other web pages.

Q3. What attributes are commonly used with <iframe>?
src (source URL), width, height, title (for accessibility), frameborder, allowfullscreen, sandbox for security.

Q4. What security concerns exist with iframes?
Iframes can be used for clickjacking attacks. Use sandbox attribute and only embed trusted content from secure sources.

Q5. How do you make an iframe responsive?
Wrap iframe in a container with position: relative and use padding-top hack, or set width: 100% and height: auto.