HTML Quiz

Thirty questions covering the whole course. Choose an answer for each, then press Check answers at the bottom to see your score and an explanation for every question.

1. What does HTML describe?

2. What must be the very first line of an HTML document?

3. Where does the <title> element go?

4. Which of these is a void element (no closing tag)?

5. How do you turn a boolean attribute like disabled off?

6. How many <h1> elements should a page normally have?

7. Which element conveys strong importance?

8. How do you display a literal < character in text?

9. What is the best link text for a PDF report?

10. Which link opens the user's email app?

11. What alt text should a purely decorative image have?

12. Why set width and height on images?

13. Which element lets you serve a different image crop on small screens?

14. What does the <track> element add to a video?

15. What does the sandbox attribute do on an iframe?

16. Which element can be a direct child of <ul>?

17. What does scope="col" on a <th> mean?

18. What should tables be used for?

19. What's the difference between a class and an id?

20. Which element represents the page's primary content?

21. Why connect a <label> to an input?

22. What is the default type of a button inside a form?

23. Which input type gives a numeric keypad AND checks min/max values?

24. Are disabled form fields submitted?

25. Which method should a login form use?

26. Why is client-side validation not enough on its own?

27. What does the defer attribute do on a script?

28. Which opens a modal dialog with the page behind it made inert?

29. What is the first rule of ARIA?

30. What does loading="lazy" do on an image?

Missed a few? Each explanation names the lesson to revisit. Then try the exercises.