HTML & CSS Links & Images Quiz

This HTML quiz covers the <a> and <img> elements. You will work out where relative links go, write good alt text, open links safely in new tabs and help the browser load images without layout jumps.

Easy 10 questions ~5 minutes Pass at 80%

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

Which link opens in a new tab or window?

Show the answer

D. <a href="/docs" target="_blank">Docs</a> target="_blank" opens the link in a new browsing context (usually a tab). rel="external" only describes the link and does not change where it opens; window and open are not link attributes.

What this quiz covers

  • href values: relative paths, fragments and mailto:
  • target="_blank" and rel
  • Writing useful alt text, and empty alt for decoration
  • width/height, loading="lazy" and srcset
  • Descriptive link text

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.