API …
Web elements

Links, redirects & images

Links that return real HTTP status codes, redirect chains and broken versus healthy images.

Practice tasks

  • Collect every link and assert its HTTP status with the request API.
  • Follow the 3-hop redirect and assert the final URL.
  • Detect broken images using naturalWidth === 0.
  • Assert a link opens in a new tab with rel=noopener.

More Web elements practice