TetSharing

HTML final quiz

One question from each of the 12 chapters. Pick an answer for each, then press Check answers. Each explanation links back to the chapter it comes from, so you know exactly what to reread.

12 questions

1. What does <!DOCTYPE html> do?

The doctype tells the browser to render with modern standards rather than quirks mode. (Chapter 1: Get started)

2. How many elements on one page should share the same id?

An id must be unique within the document. (Chapter 2: Elements and attributes)

3. What happens to five spaces between words in normal HTML text?

HTML collapses runs of whitespace into a single space. (Chapter 3: Headings and paragraphs)

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

The character reference &lt; renders as <. (Chapter 4: Text formatting)

5. What does href="/about/" point to?

URLs starting with / are resolved from the site root. (Chapter 5: Links)

6. Why set width and height on images?

Known dimensions let the browser lay out the page before the image arrives. (Chapter 6: Images)

7. Which attribute makes an ordered list count down?

The boolean reversed attribute numbers items in descending order. (Chapter 7: Lists)

8. Where does <caption> go?

The caption must be the first child of the table. (Chapter 8: Tables)

9. What is the default type of a <button> inside a form?

A button with no type submits its form. (Chapter 9: Forms)

10. In which format does <input type="date"> store its value?

The value is always an ISO-style date; only the display is localized. (Chapter 10: Input types and controls)

11. Which element suits a blog post that could be syndicated on its own?

An article is self-contained content. (Chapter 11: Semantic layout)

12. Where is the <title> text shown?

The title labels the document outside the page content. (Chapter 12: Head and metadata)

← Back to the HTML tutorial