Why test HTML and CSS before you hire?
Many front-end candidates learnt a framework first and the platform second. That shows up later as inaccessible forms, layouts held together with fixed widths and CSS that nobody wants to touch. A short test on the fundamentals tells you whether someone can build a page that works for keyboard users, adapts to a phone screen and doesn't break when another rule is added.
What this template covers
- Semantic HTML: choosing
<nav>,<button>and labelled inputs over generic elements. - Accessibility:
alttext, form labels, error messages and colour contrast. - The cascade: specificity, source order and which rule wins.
- The box model: padding, borders and
box-sizing. - Layout: flexbox alignment, grid with
auto-fit, positioning and media queries.
How to run it well
Twelve questions in 12 to 15 minutes is a fair screen. Candidates will want to picture the result of some rules, so do not cut the time too short. A pass mark around 65% suits junior roles and web designers; for senior front-end engineers, set 75% and add questions on custom properties, stacking contexts and performance.
Shuffle questions and options to make sharing answers pointless. The template mixes single-choice items with a select-all accessibility question, a true/false and a short answer. In results, compare the box model and specificity answers. Candidates who get these right usually write CSS that is easier for the rest of the team to maintain.
Who this test is for
Use it for front-end developers, web designers who code, email and landing page developers, WordPress and CMS developers and graduates from web development courses. Agencies can use it to check freelancers before giving them access to client sites. It is also useful for back-end developers who will be expected to touch templates, and for designers moving into code. Their results show whether they can work on markup and styles without help or need a front-end colleague to review every change.
Make it yours
Add questions about the tools and conventions you use, such as Tailwind, Sass, BEM naming or your design system's spacing rules. A screenshot of a layout with a question like "which CSS produced this?" makes a strong practical item. You can ask the AI generator for more accessibility questions and check each one before it goes into your test. Keep code snippets short so they stay readable on small screens.