typestar

Embedded frames in HTML

An iframe with the attributes that keep an embed from misbehaving.

<iframe src="https://example.com/embed/map" title="Office location"
        width="600" height="400" loading="lazy"
        sandbox="allow-scripts allow-popups"
        referrerpolicy="no-referrer"></iframe>

How it works

  1. title is required — it names the frame for screen readers.
  2. sandbox drops privileges; add back only what is needed.
  3. loading=lazy and allow control cost and permissions.

The run, in numbers

Lines
4
Characters to type
183
Tokens
28
Three-star pace
75 tpm

At the three-star pace of 75 tokens a minute, this run takes about 22 seconds.

Type this snippet

Step 9 of 9 in Media & embeds, step 16 of 23 in Semantics & metadata.

← Previous Next →