STEP 1 · LEARN How it works Declare an iframe with a title, lazy loading and an explicit sandbox. Semantic structure should describe meaning, not visual appearance.
<iframe src="/demo/project/" title="Interactive project demonstration" loading="lazy" sandbox></iframe>The src identifies the embedded document, title describes it for people who cannot identify it visually and loading="lazy" can defer loading. An empty sandbox applies maximum restrictions; permissions are added only when needed and reviewed.
<iframe src="/demo/" title="Demo" loading="lazy" sandbox="allow-scripts allow-same-origin"></iframe>The basic attributes exist, but combining allow-scripts and allow-same-origin can seriously weaken isolation for same-origin content.
EXPECTED RESULT An iframe with non-empty src and title, loading="lazy" and an explicit sandbox without the allow-scripts + allow-same-origin combination.
STEP 2 · APPLY Your exercise Complete the example. Declare an iframe with a title, lazy loading and an explicit sandbox.
Code Result
index.html HTML
Exercise code
STEP 4 · CHECK
What needs to pass 0% not checked
○ The iframe declares a non-empty source. ○ The iframe has a descriptive title. ○ The iframe uses lazy loading and an explicit sandbox. ○ The sandbox does not combine allow-scripts with allow-same-origin.
Check exercise✓ Show a hint
Explain the solution logic+ Add src, title and loading="lazy". For this lesson use an empty sandbox attribute; do not add allow-scripts and allow-same-origin together.