Native audio and video, iframes, and how to embed third-party content safely.
HTML5 introduced native audio and video elements, removing the need for plugins like Flash. They support attributes such as controls, autoplay, loop, muted and preload, and multiple source elements let you offer several formats so the browser can pick one it supports. The track element adds captions and subtitles, which matters for accessibility, and browsers generally block autoplay with sound unless the video is muted.
For embedding external content such as maps, videos or widgets, the iframe element loads another page inside yours. Because that content runs in its own browsing context, security attributes are important: sandbox restricts what the embedded page can do, and the allow attribute controls features like fullscreen or camera access. Interviewers often ask about the performance and security trade-offs of iframes, including using loading="lazy" and why you should be careful about embedding content you don't control.
What you'll walk away knowing