Frontend Fundamentals: HTML, CSS, and Responsive Styling Questions

Core web-platform implementation skills: semantic HTML and document structure, native controls versus ARIA-patched divs (button versus link), accessible markup (labels, headings, landmarks, image alt text, icon-only buttons, keyboard operability, skip links, ARIA basics, focus styles), the CSS box model, cascade and specificity (including cascade layers and taming !important), selector matching cost, display types, positioning (static, relative, absolute, fixed, sticky) and stacking contexts and z-index, flexbox and grid layout (including subgrid and masonry options), units and fluid sizing (rem, clamp, viewport units including dynamic viewport units), the viewport meta tag, media queries, mobile-first breakpoints and how to choose them, container queries, responsive images (srcset, sizes, picture, aspect-ratio), touch target sizing, right-to-left and long-text layouts, custom properties and light/dark theming, and CSS organization (BEM, CSS Modules, utility-first, Sass). Includes debugging layout bugs, progressive enhancement, @supports and cross-engine CSS fallbacks. Performance measurement, building full interactive widgets and form flows, design-system governance, WCAG audit strategy, design handoff, visual regression testing and cross-browser test coverage are covered elsewhere.

EasyTechnical
64 practiced

Design accessible focus and hover styles for interactive controls. Requirements:

  • Keep visible focus outlines for keyboard users
  • Avoid relying only on :hover for critical functionality (touch devices)
  • Use :focus-visible where appropriate
    Provide CSS snippets that implement a consistent focus treatment and explain how to prevent hover-only styles from degrading touch experiences.
MediumTechnical
75 practiced

You work on a CMS-driven site where editors upload images with arbitrary aspect ratios. Propose a scalable solution for delivering responsive images and correct art direction: include how you would store focal points or crop variants, generate responsive sizes/formats, expose options in the CMS UI for editors, and how the front-end should select and render these resources. Discuss CDN integration and performance trade-offs.

MediumTechnical
91 practiced

In plain HTML, CSS, and vanilla JavaScript implement an accessible 'Skip to main content' link that appears as the first focusable element, becomes visible when focused, and moves keyboard focus to the main content container. Also describe how this pattern should adapt for a single-page application where the main content id may change on navigation.

EasyTechnical
80 practiced

You have the following images on a product page: a company logo in the header, a decorative SVG divider, a product photo showing multiple items, an infographic chart, and an icon-only button. For each image describe the appropriate alt text (or why it should be empty) and where a long description belongs for complex images like charts. Explain trade-offs between concise and verbose alt text.

EasyTechnical
73 practiced

Compare and contrast the CSS sizing units: px, %, em, rem, vw, and vh. For each unit describe how it is calculated, typical use cases in responsive layouts (e.g., layout sizing, typography, spacing), and one common pitfall. Provide a concise example where combining units (for example rem + vw) achieves a fluid, responsive result.

Unlock Full Question Bank

Get access to all Frontend Fundamentals: HTML, CSS, and Responsive Styling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.