Skip to content
← All Assessments
Skills

CSS & HTML Assessment Test for Hiring

Verify frontend fundamentals — semantic HTML, responsive design, Flexbox, Grid, CSS animations, and accessibility best practices.

What It Measures

CSS and HTML skill is one of those deceptively simple hiring categories. Everyone says they know it. Far fewer can build interfaces that are semantic, accessible, resilient, and fast. This assessment is designed to separate people who can style a mockup from people who can ship production-quality frontend foundations. At the core, the assessment measures semantic HTML fluency. Strong candidates know when to use
,
,

How It Works

The assessment uses six scenario-based questions that mirror common frontend tasks. Each question is anchored in a practical problem: fixing inaccessible markup, choosing the right layout model, resolving specificity conflicts, improving responsive behavior, or deciding how to structure a reusable component. The first section focuses on HTML semantics. Candidates evaluate page structures and choose the most appropriate markup for articles, navigation, forms, and calls to action. The goal is to see whether they understand how the browser and assistive technologies interpret structure, not whether they memorized a tag list. The second section tests CSS layout judgment. Candidates compare Grid versus Flexbox solutions, identify cleaner ways to align components, and choose patterns that survive real content variation. This is where weak candidates reveal themselves quickly. They often know a property or two, but they do not understand why a layout breaks when content wraps, when spacing changes, or when a translated string gets longer. The third section covers responsiveness. Candidates handle card grids, navigation patterns, typography scaling, and image behavior across breakpoints. We care about mobile-first reasoning, sensible defaults, and graceful adaptation rather than overengineered breakpoint soup. The fourth section evaluates accessibility. Expect scenarios involving labels, focus states, keyboard interactions, landmark regions, contrast, and ARIA. Strong candidates know that ARIA is a precision tool, not a bandage. They start with native elements and only add ARIA when the interaction truly requires it. The fifth section looks at maintainability and performance. Candidates choose between tangled selectors and scalable class strategies, identify causes of layout shift, and explain how frontend choices affect load experience and debugging time. The sixth section consolidates everything into role fit. For a product designer-who-codes or a marketing developer, excellent semantic markup and responsive implementation may matter more than deep architecture vocabulary. For a frontend engineer, expectations for systems thinking and maintainability are higher. Detailed scoring methodology: - Accuracy: whether the candidate chooses the best implementation path. - Reasoning quality: whether the explanation shows conceptual understanding, not lucky guessing. - Accessibility maturity: whether the candidate protects keyboard, screen reader, and contrast requirements. - Layout judgment: whether they choose the simplest robust solution. - Maintainability: whether they avoid hacks, over-specific selectors, and duplication. - Performance awareness: whether they recognize frontend choices that affect rendering and usability. Scores are normalized to a 0-100 scale. A typical interpretation looks like this: - 85-100: strong production-ready frontend fundamentals - 70-84: capable and hireable with moderate coaching in edge cases - 55-69: workable baseline, but likely to create review overhead - Below 55: knowledge is fragmented or overly tutorial-driven This approach helps [hiring](https://heyhrm.com/assessments/hiring) teams move beyond portfolios that may hide how much support a candidate needed. The assessment captures judgment under realistic constraints, which is what actually matters on the job.

Sample Questions

1. You are building a site header with a logo, primary navigation, a search form, and a “Start Free Trial” action. Which markup choice is strongest?

  • A.Wrap everything in nested div elements because CSS classes are enough for structure.
  • B.Use a <header> containing a <nav>, a properly labeled search <form>, and a real <a> or <button> for the primary action depending on behavior.
  • C.Use a <section> for the whole header and add ARIA roles to every child element regardless of native semantics.
  • D.Use a table because alignment is easier for mixed content.

2. A product card grid should show 4 columns on desktop, 2 on tablet, and 1 on mobile while handling variable card heights cleanly. Which approach is strongest?

  • A.Use CSS Grid with responsive columns such as repeat(auto-fit, minmax(...)) and let cards flow naturally.
  • B.Use absolute positioning for each card at every breakpoint.
  • C.Use floats and clearfix utilities because they are simpler to debug.
  • D.Use a single-row Flexbox container and force fixed heights on every card.

3. A button looks visually prominent, but keyboard users cannot tell when it is focused because the outline was removed. What is the best fix?

  • A.Leave it as-is because mouse users do not need a focus ring.
  • B.Add JavaScript that briefly flashes the border on click.
  • C.Restore a visible :focus or :focus-visible style with sufficient contrast and preserve keyboard discoverability.
  • D.Replace the button with a styled div.

4. Two selectors conflict: .card .title and #pricing .card .title. The page is becoming hard to maintain because new overrides keep appearing. What is the best long-term move?

  • A.Keep adding IDs because higher specificity solves the issue quickly.
  • B.Move toward lower-specificity, reusable classes or component-scoped conventions so styles are easier to predict and override intentionally.
  • C.Use !important on all title styles.
  • D.Inline every style in the HTML.

5. An image-heavy landing page has layout shift during load. Which HTML/CSS improvement helps most directly?

  • A.Increase box-shadow on hero images.
  • B.Add explicit width and height or aspect-ratio handling so the browser reserves space before the image loads.
  • C.Hide images until the page fully loads with display:none.
  • D.Move all CSS into inline style attributes.

6. A custom dropdown was built from div elements and needs keyboard support, labeling, and screen-reader clarity. What is usually the best recommendation?

  • A.Keep the custom widget and add random tabindex values until it feels usable.
  • B.Replace it with a native <select> if the interaction requirements allow, because native controls provide accessibility and behavior for free.
  • C.Turn it into a paragraph with onclick events.
  • D.Remove labels to reduce screen-reader noise.

Frequently Asked Questions

What does the CSS & HTML assessment actually test?
It tests semantic HTML, responsive layout decisions, Flexbox and Grid usage, accessibility fundamentals, CSS architecture, and performance-aware frontend judgment. In plain English: can the candidate build interfaces that hold up in production, not just in a tutorial?
How long does the assessment take?
Most candidates finish in 20 to 30 minutes. That is long enough to expose real judgment without turning screening into a half-day project.
Is this assessment suitable for junior frontend hires?
Yes. It works for junior to mid-level screening because the questions emphasize fundamentals. Senior candidates should score higher because they recognize tradeoffs faster and explain them more clearly.
Does the assessment include accessibility?
Yes. Accessibility is a core scoring dimension, not a side note. Candidates are evaluated on semantic markup, focus states, labels, keyboard support, and proper use of native elements versus ARIA.
How are candidates scored?
Scores combine answer accuracy, reasoning quality, accessibility maturity, layout judgment, maintainability, and performance awareness. The goal is to identify candidates who can ship clean frontend work with less review overhead.
Why not just use a portfolio review instead?
Portfolios are useful, but they hide how much support the candidate needed and rarely show edge-case judgment. A structured assessment adds a comparable baseline across applicants.
How does this compare with SHL or TestGorilla?
SHL is strong for enterprise consistency and TestGorilla is fast to deploy, but both can feel broader and less opinionated about modern frontend craft. HeyHRM goes deeper on semantic HTML, accessibility, responsive layout, and maintainability.
Can marketing or no-code adjacent hires take this assessment?
Yes. It is useful for growth marketers, CMS specialists, and designers who touch landing pages, especially when semantic markup, responsive edits, and experimentation speed matter.
What score is considered good?
A score above 70 usually indicates solid working fundamentals. Above 85 suggests the candidate can likely contribute with minimal frontend hand-holding.
What research supports this type of test?
Work-sample and job-relevant assessments generally outperform self-reported skill claims in predicting on-the-job value. That principle is supported by selection research including Schmidt and Hunter’s work on validity in personnel selection.

Ready to assess candidates?

Start screening with CSS & HTML Assessment today. Free to get started.

Get Started Free

Related Assessments

Browse All Assessments →

From the Blog