HTML and CSS final quiz

  • Admin
  • 1 min read

Ten mixed questions covering structure, accessibility, Flexbox, Grid, responsiveness and performance.

HTML & CSS

HTML and CSS final quiz

10 questions, instant feedback

Question 1 of 10
Question 1 of 10 Which structure puts the page in the most useful reading order?
Why this is the answer

Landmarks and a single h1 give assistive technology and search engines a clear outline, and they still work when CSS fails.

Question 2 of 10
Question 2 of 10 An icon button has no visible text. What does it need?
Why this is the answer

An icon conveys nothing to a screen reader without a name. aria-label works, and visually hidden text is often more robust for translation.

Question 3 of 10
Question 3 of 10 Which input setup gives the best tap target on mobile?
Why this is the answer

A 44px target and a real label improve accuracy and comprehension. Placeholders disappear as soon as typing starts and are not labels.

Question 4 of 10
Question 4 of 10 Which Flexbox declaration wraps cards onto new lines?
Why this is the answer

flex-wrap: wrap lets items move to the next line when they run out of space, which is the basis of many card layouts.

Question 5 of 10
Question 5 of 10 Which Grid setup reflows cards without a media query?
Why this is the answer

auto-fit with minmax lets the grid decide how many columns fit. It is responsive by construction, though media queries are still useful for larger layout changes.

Question 6 of 10
Question 6 of 10 What is the main risk of fixed pixel widths on a page?
Why this is the answer

A fixed width wider than the viewport forces horizontal scrolling. Fluid widths with max-width avoid it.

Question 7 of 10
Question 7 of 10 Why should images include width and height attributes?
Why this is the answer

The browser can reserve the correct aspect ratio before the image arrives, which keeps the page from jumping as it loads.

Question 8 of 10
Question 8 of 10 Which practice improves contrast on a coloured hero section?
Why this is the answer

Text over an image needs a reliable background. An overlay or panel makes contrast predictable and readable.

Question 9 of 10
Question 9 of 10 What does a design token in a custom property buy you?
Why this is the answer

Tokens such as --space-2 or --color-brand centralise decisions, which is what makes a theme change a few lines instead of a search-and-replace.

Question 10 of 10
Question 10 of 10 A user has reduced motion enabled. What should happen to your animations?
Why this is the answer

Motion can cause discomfort. A reduced-motion query that disables transforms and long transitions is a basic accessibility requirement.

Your answers stay in this browser. Nothing is sent to a server.