HTML and CSS Quiz: 12 Questions
This free HTML and CSS quiz checks the core front-end skills you need before moving on to JavaScript or PHP: semantic elements, alt text, form labels, selector specificity, box-sizing, flexbox versus grid, CSS units, media queries, positioning and display. It is aimed at beginners and students revising for practicals or interviews. Answer all 12 questions, check your score, then read the explanations and revisit the CSS guide for anything you missed.
Frequently asked questions
Do I need to know JavaScript for this quiz?
No. It covers only HTML and CSS. There is a separate JavaScript quiz when you are ready.
Why does the quiz include accessibility questions?
Alt text, labels and semantic elements are part of writing correct HTML. They help screen reader users and also help search engines understand the page.
Should I learn flexbox or grid first?
Most people start with flexbox for one-dimensional layouts such as navigation bars, then learn grid for full page and card layouts. You will use both.