• in
InterCourses
CoursesBlogs
0
← Introduction to HTML
○What Is HTML? See Tags in Action○Exercise: Build the Meridian Signal○Complete HTML5 Page Structure: See It in Action○Exercise: Build a Complete HTML5 Page✦Module Quiz
○Heading Hierarchy Demo: H1 and H2○Exercise: Extend the Signal Brief○Paragraphs and Inline Tags Demo○Exercise: Write Meridian's Survey Notes○List Types Demo: Steps, Items, and Terms○Exercise: Build a Crew member Loadout○Challenge: Transmit a Rescue Signal✦Module Quiz
○Hyperlinks○Images○Applying Styles to HTML✦Module Quiz
○Div and Span○HTML Tables○Classes and IDs○Review: Structured Profile✦Module Quiz
○Project 1 - Visiting Card Structure○Project 1 - Visiting Card Actions✦Module Quiz
○The Head Element and Page Title○Meta Tags○HTML Entities✦Module Quiz
○Form Basics Demo: Join the Meridian Relay○Exercise: Build a Night-Shift Check-In○Input Types Demo: Build a Mission Profile○Exercise: Record Beacon Maintenance○Choice Controls Demo: Select Training Modes○Exercise: Plan a Supply Pickup○Response Controls Demo: Send a Mission Reply○Exercise: Build a Rescue Dispatch Report○Challenge: Send an Emergency Beacon✦Module Quiz
○Project 2 - Contact Us Form Structure○Project 2 - Contact Us Form Actions✦Module Quiz
○Embedding Video○Embedding Audio●Iframes✦Module Quiz
○Semantic HTML Tags○Details, Figure, and Figcaption✦Module Quiz
○Project 3 - Resume Semantic Structure○Project 3 - Resume Links and Actions✦Module Quiz

Iframes

Mission

The Riverlight Community Hall wants to place a public transit map inside its visitor page. Embed the map in a frame that names what it contains and limits permissions the map does not need.

What you'll build

A titled, sized iframe for the hall’s transit-map embed, with restricted permissions and lazy loading.

Target

Your preview reserves space for the map iframe. The remote page may not load in the course preview; check the markup even if the frame stays blank.

One idea: an iframe is another page with its own boundary

<iframe> displays another HTML page inside yours. The embedded page remains a separate document, so it needs a clear title for screen readers and careful permissions.

html
<iframe
    src="https://example.com"
    width="800"
    height="450"
    title="Example Domain information page"
    sandbox="allow-scripts"
    loading="lazy"
></iframe>

src points to the page. width and height reserve space before it loads. sandbox starts restrictive; add only the tokens the embed requires. loading="lazy" waits until the frame is near the viewport.

Checkpoint

The example above uses a documentation site, not a transit map; its frame may be blank because that site does not permit embedding. For the hall page, use a map provider’s embed URL, not the normal map page URL. Preview the reserved space and inspect the iframe attributes; playback of remote content is not required to pass the checks.

Permission choices

Sandbox tokenAllows
allow-scriptsJavaScript in the embedded page
allow-formsForm submission
allow-popupsOpening new windows
allow-same-originThe frame's normal origin behavior

Do not add permissions by habit. Cross-origin frames cannot freely read each other's DOM, and a frame with unnecessary permissions increases risk.

Your Task

Add the transit-map frame:

  1. Add one <iframe> for the transit map below the page heading.
  2. Give it a src pointing to a public map embed URL (for example, OpenStreetMap’s export/embed URL).
  3. Give it a descriptive title identifying the map.
  4. Set both width and height to reserve space.
  5. Add sandbox="allow-scripts" to limit its permissions.
  6. Add loading="lazy" so it can wait until near the viewport.

Payoff

The visitor page now has a clearly described, constrained space for outside content.

Hint 1
1 / 4
HINT 1

The src attribute is the URL of the page to embed.

HINT 2

Use width and height to set dimensions, or control size with CSS.

HINT 3

The sandbox attribute restricts what the embedded page can do — a good security practice.

HINT 4

Not all websites allow embedding — if a page has X-Frame-Options: DENY you cannot iframe it.

Take the Quiz →
Loading editor…
READY
intercourses
html