Results for “Images & embedded documents”
Small, practical examples. Search by task or narrow things down below.
Allow embedded scripts without granting same-origin access
HTML: Grant only allow-scripts so the sandboxed document retains an opaque origin.
HTML✓ Tested
Block scripts in an embedded document
HTML: An empty sandbox attribute applies the default set of restrictions, including blocking script execution.
HTML✓ Tested
Name a self-contained embedded document
HTML: Give an iframe a descriptive title and provide its small document with srcdoc.
HTML✓ Tested
Choose a different image for a small viewport
HTML: Picture evaluates source media conditions before falling back to the img source.
HTML✓ Tested
Draw a basic rectangle on a labeled canvas
HTML: Canvas requires script to draw pixels; provide alternative content and an accessible label.
HTML✓ Tested
Exclude a purely decorative image from accessible content
HTML: An empty alt indicates that this image adds no information beyond nearby content.
HTML✓ Tested
Give an inline SVG an accessible name
HTML: Use a title referenced by aria-labelledby for a meaningful inline vector image.
HTML✓ Tested
Keep an image and its visible caption together
HTML: Figure and figcaption represent a self-contained illustration with an associated caption.
HTML✓ Tested
Name a meaningful image with alternative text
HTML: Alt supplies an accessible text alternative describing the image’s purpose.
HTML✓ Tested
Reserve an image’s display dimensions
HTML: Width and height attributes supply a known display size and aspect ratio before decoding finishes.
HTML✓ Tested
Quote a CSV field and double embedded quotes
C: A quoted CSV field represents a quote character by repeating it.
C✓ Tested
Advance an index around a fixed collection
Arduino / C: Modulo wraps a bounded nonnegative index to zero.
Arduino / C✓ Tested