Quick answer: What HTML and CSS skills do web jobs test, and how do I prepare?
- HTML — semantic elements, headings, landmarks, forms with labels, images with alt text.
- CSS core — box model, cascade, specificity, inheritance, units.
- Layout — flexbox for one dimension, grid for two; responsive design with media and container queries.
- Accessibility — keyboard focus, contrast, readable text, not relying on colour alone.
- How it's tested — build a layout from a design, fix broken markup, explain CSS behaviour.
Key takeaways
- Framework skills don't replace HTML and CSS; interviewers notice div soup immediately.
- Semantic HTML is the cheapest accessibility win and a frequent interview topic.
- Most CSS confusion comes from the box model, specificity and stacking — learn them properly.
- Modern CSS (grid, container queries, custom properties) removes many old hacks.
- HTML/CSS skill is the entry point to front-end, UI engineering and email development roles.
Picture a front-end task at a design agency: "Build this pricing card from the screenshot." One candidate produces a pixel-perfect card from nested divs, a clickable div for the button and fixed pixel widths. On a phone it overflows; with a keyboard the button can't be reached. Another uses a section with a heading, a list for features, a real button, grid for the layout and relative units — and it works on every screen size and with a screen reader without extra effort. HTML and CSS look simple, which is exactly why interviews use them to find careful developers.

Why HTML and CSS still decide web interviews
Every web interface, however it's built, ends as HTML and CSS in the browser. Semantic HTML determines whether assistive technology and search engines understand a page; CSS determines whether layouts are responsive, consistent and maintainable. That is why front-end, UI and web roles test them directly — and why HTML/CSS sits near the top of technologies used by professional developers in Stack Overflow's 2025 survey.6
These skills are the entry point to the largest group of web jobs in India: AmbitionBox lists about 68,600 front-end developer salaries, with typical pay of ₹6.1–6.7 lakh in October 2026.7
- Professional developers using HTML/CSS (Stack Overflow, 2025)
- ~63%
- Typical front-end developer pay in India (AmbitionBox, Oct 2026)
- ₹6.1–6.7 lakh
- The accessibility standard markup is judged against
- WCAG 2.2
- Layout systems to master: flexbox and grid
- 2
How HTML and CSS are tested
| Format | Example | What they check |
|---|---|---|
| Build from a design | Recreate a card, navbar or page | Semantics, layout, responsiveness |
| Markup review | "What's wrong with this form?" | Labels, buttons, headings, alt text |
| CSS explanation | "Why isn't this z-index working?" | Stacking contexts, specificity, box model |
| Responsive task | Make a layout work at 320 px and 1440 px | Units, media and container queries |
| Accessibility check | Navigate with a keyboard | Focus order and visibility |
Table: How HTML and CSS are tested in interviews (editorial summary)
What a fundamentals test covers

Semantic HTML
Landmarks (header, nav, main, footer), heading levels, lists, buttons vs links, and alt text.
Forms
Labels tied to inputs, input types, fieldsets, required fields and error messages.
Box model and cascade
content, padding, border, margin; box-sizing; the cascade, inheritance and specificity.2
Flexbox and grid
Alignment, wrapping, gaps, grid templates and areas.
Responsive design
Fluid units, media queries, container queries, responsive images.
Accessibility basics
Visible focus, sufficient contrast and not relying on colour alone (WCAG 2.2).4
MDN's learning area and web.dev's Learn CSS course are excellent free references,13 and web.dev's Baseline tells you which modern CSS features are safe to use across browsers.5
Worked example: a form that passes review
<form>
<label for="email">Work email</label>
<input id="email" name="email" type="email" autocomplete="email" required aria-describedby="email-hint">
<p id="email-hint">We'll send your invoice here.</p>
<fieldset>
<legend>Plan</legend>
<label><input type="radio" name="plan" value="monthly" checked> Monthly</label>
<label><input type="radio" name="plan" value="yearly"> Yearly</label>
</fieldset>
<button type="submit">Start free trial</button>
</form>
Why it passes: every input has a real label, the hint is linked with aria-describedby, the email type gives mobile keyboards and validation, autocomplete helps users, radio buttons are grouped with a legend, and a real button submits the form — keyboard and screen-reader support come free.
HTML and CSS interview questions, with how to answer them
"Explain the box model."
Each element is content plus padding, border and margin. With box-sizing: border-box, width includes padding and border, which makes layouts easier to reason about.
"Why isn't my z-index working?"
z-index only works within a stacking context and on positioned (or flex/grid) items; a parent with its own stacking context (for example, opacity or transform) can trap the child.
"Flexbox or grid for a card layout?"
Grid for the overall rows and columns of cards; flexbox inside each card to align content.
"How do you center something?"
For most cases, display: grid with place-items: center on the parent, or flexbox with justify-content and align-items.
"em vs rem vs px?"
px is absolute; em is relative to the element's font size; rem to the root font size — rem keeps sizing consistent and respects user preferences.
"Button or link?"
Links navigate to a URL; buttons perform actions. Using the right one gives correct keyboard behaviour and meaning.
"How do you make images responsive?"
max-width: 100% and height: auto, plus srcset and sizes so the browser picks the right file.
"What's the difference between display: none and visibility: hidden?"
display: none removes the element from layout and the accessibility tree; visibility: hidden keeps its space but hides it.
How HTML/CSS expectations have changed
| Period | What happened | What employers expected |
|---|---|---|
| 2005–2010 | Table layouts give way to CSS; browser hacks | Cross-browser fixes |
| 2011–2016 | HTML5 semantics, responsive design, flexbox | Mobile-first layouts |
| 2017–2021 | CSS grid, custom properties | Modern layout without frameworks |
| 2022–2024 | Container queries, :has(), cascade layers | Component-level responsive design |
| 2025–2027 | AI-generated markup, accessibility regulation | Reviewing generated HTML for semantics and access |
Table: How HTML and CSS expectations have changed (editorial summary)
Practice tasks that build the skill
- Rebuild three real pages — A pricing page, a blog article and a dashboard shell, with no CSS framework.
- Keyboard-only test — Navigate each page with Tab, Enter and Space; fix anything you can't reach.
- Grid layouts — Build a responsive card grid with grid-template-columns: repeat(auto-fill, minmax(...)).
- Specificity puzzles — Predict which rule wins in ten conflicting examples, then check.
- Container query card — Make one component adapt to its container width, not the viewport.
Could you pass the HTML and CSS Fundamentals Certification today?
Hiring managers test judgement with scenarios like this one. Answer it before you open the explanation — the test has 10 of them, 10 minutes, 70% to pass.
Which meta tag is essential for responsive pages on phones?
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta charset="utf-8"> only
- <meta name="mobile" content="yes">
- <meta name="responsive">
Show the answer
A. <meta name="viewport" content="width=device-width, initial-scale=1"> — Without the viewport tag, phones render a zoomed-out desktop width.
- 01HTML
- 02CSS
Free, no sign-up. Pass and you become a HTML and CSS Fundamentals, with a credential ID employers can verify. Every answer is explained either way.
Where HTML/CSS takes your career
| Role (India) | Typical pay | HTML/CSS's part in the job |
|---|---|---|
| Front-end developer | ₹6.1–6.7 lakh | Every interface |
| React developer | ₹5.7–6.3 lakh | Component markup and styling |
| PHP/WordPress developer | ₹4.1–4.5 lakh | Themes and templates |
| Full-stack developer | ₹9.2–10.2 lakh | UI side of the stack |

Table: Roles that rely on HTML and CSS and typical pay in India (AmbitionBox, October 2026; indicative)
A four-week plan

- Week 1: Semantic HTML and forms — Landmarks, headings, labels, buttons vs links.
- Week 2: CSS core — Box model, cascade, specificity, units.
- Week 3: Layout — Flexbox, grid, responsive and container queries.
- Week 4: Accessibility and proof — Keyboard and contrast checks; take the HTML and CSS Fundamentals Certification.
Next: JavaScript Fundamentals, Responsive Web Design and Accessibility. Our JavaScript interview guide is the natural next read.
How HTML and CSS show up at work
- Implementing designs — turning Figma screens into responsive layouts that match spacing and type scales.
- Component styling — building buttons, cards and forms in a design system with consistent tokens.
- Accessibility fixes — adding labels, focus styles and landmarks after an audit.
- Cross-browser checks — testing layouts on mobile Safari, Chrome and older Android browsers.
- Performance — reducing layout shifts and unused CSS.
- Email and CMS work — writing robust HTML for email clients or content templates.
More questions interviewers ask
"What is the difference between relative, absolute, fixed and sticky positioning?"
Relative offsets an element from its normal position; absolute positions it relative to the nearest positioned ancestor and removes it from flow; fixed positions it relative to the viewport; sticky behaves relatively until a scroll threshold, then sticks.
"How do CSS custom properties help?"
They store reusable values (colours, spacing) that cascade and can change at runtime — the basis of themes and design tokens.
"What does the alt attribute do, and when should it be empty?"
It describes an image for screen readers and when images fail to load; decorative images get alt="" so assistive technology skips them.
"How do you make a site work for users who zoom to 200%?"
Use relative units, flexible layouts and avoid fixed heights so content reflows instead of overlapping or requiring horizontal scrolling.
Mistakes that cost candidates
- Div soup with clickable divs.
- Missing labels on form fields.
- Fixed pixel widths that break on phones.
- !important to win specificity fights.
- Removing focus outlines without a replacement.
How we know
Technical references are MDN (HTML, CSS and specificity), web.dev (Learn CSS and Baseline) and W3C's WCAG 2.2; usage data from Stack Overflow's 2025 survey; pay from AmbitionBox (read October 2026). Test formats and the history table are editorial summaries. Science of Apps publishes the free certification linked here. Last reviewed October 2026.
Key terms, defined
- Semantic HTML — markup that describes meaning, such as nav or button.
- Box model — content, padding, border and margin around every element.
- Specificity — the weight that decides which CSS rule wins.
- Flexbox / grid — CSS layout systems for one and two dimensions.
- Container query — CSS that responds to a component's container size.
- Stacking context — a layer in which z-index values are compared.
Frequently asked questions
Do HTML and CSS still matter for developer jobs?
Yes. Every web interface ends up as HTML and CSS, whatever framework generates it. Employers test them because semantic markup affects accessibility and SEO, and CSS skill decides whether layouts are responsive and maintainable. Weak HTML/CSS is a common reason front-end candidates are rejected.
What is semantic HTML?
Using elements for their meaning — header, nav, main, article, button, label — rather than generic divs and spans. It helps screen readers, keyboard users and search engines understand the page, and often gives you behaviour like focus and keyboard activation for free.
Flexbox or grid?
Flexbox lays out items in one dimension — a row or a column — and is ideal for toolbars, navigation and aligning items. Grid handles two dimensions — rows and columns together — and suits page layouts and card grids. Real layouts often use both.
What is CSS specificity?
Specificity decides which rule wins when several match the same element: inline styles beat IDs, IDs beat classes, attributes and pseudo-classes, which beat element selectors. When specificity ties, the later rule wins. Keeping specificity low makes CSS easier to maintain.
What HTML and CSS questions are asked in interviews?
The box model and box-sizing, specificity and the cascade, positioning and z-index, flexbox vs grid, responsive techniques, semantic elements, form labels, accessibility basics, and often a task to build a layout from a screenshot.
Which jobs need strong HTML and CSS?
Front-end developers, UI engineers, web designers who code, email developers, WordPress and CMS developers, design-systems engineers and many full-stack developers.
Sources
- MDN Web Docs — Learn web development: HTML and CSS
- MDN Web Docs — Specificity
- web.dev — Learn CSS
- W3C — Web Content Accessibility Guidelines (WCAG) 2.2
- web.dev — Baseline: features available across browsers
- Stack Overflow — 2025 Developer Survey, Technology
- AmbitionBox — Front end Developer salaries in India (updated 24 Oct 2026)
- Checked October 28, 2026. Figures that change — fees, salaries, prices — are reviewed every six months; if something is out of date, tell us.
Certifications to take next
- 20 AI skills for software engineers — copy-paste prompts for this job, one tap into ChatGPT or Claude
- HTML and CSS Fundamentals Certification — the free 10-minute test on semantic HTML, the box model and layout
- How to get a front-end developer job — the role these skills lead to
- Accessibility checklist — the checks your markup should pass
- Free skill test · 15 minFront-End Development CertificationTests modern front-end engineering — component architecture, state, performance and Core Web Vitals, accessibility, responsive layouts, testing and build tooling.
- Free skill test · 10 minJavaScript Fundamentals CertificationTests core modern JavaScript — variables and scope, types and equality, functions and closures, arrays and objects, promises and async/await, modules and the DOM.
- Free skill test · 15 minAngular Developer AssessmentTests modern Angular — standalone components, signals, dependency injection, templates and control flow, routing, forms, RxJS interop and performance.
- Free skill test · 15 minSecure Coding Fundamentals CertificationTests secure coding against the OWASP Top 10 — injection, XSS, broken access control, authentication, secrets, dependencies, input validation and secure defaults.
- Free skill test · 15 minGraphQL Fundamentals CertificationTests GraphQL — schemas and types, queries, mutations and subscriptions, resolvers, the N+1 problem and DataLoader, pagination, errors and securing GraphQL APIs.
- Free skill test · 15 minFull-Stack Web Development CertificationTests end-to-end web development — front end, APIs, databases, authentication, deployment, environment configuration and performance across the stack.
Career guides for related roles
- Career guidesHow to get a front-end developer job in 2027: the skills, projects and interview rounds that decide itHow to get a front-end developer job in 2027: JavaScript, React, accessibility and performance skills employers test, the interview loop, pay and a plan.
- Career guidesC++ developer jobs in 2027: modern C++, memory, performance and the interviews in systems, games and tradingC++ developer jobs in 2027: the modern C++, memory, concurrency and performance skills employers test in systems, games and trading, with pay.
- Career guidesJavaScript interview questions for freshers in 2027: the fundamentals every web job tests, with clear answersJavaScript interview questions for freshers in 2027: scope, closures, this, promises, the event loop and the DOM, with answers and a plan.
- Career guidesHow to get a Java developer job in 2027: modern Java, Spring Boot and the interview rounds banks and product firms runHow to get a Java developer job in 2027: core and modern Java, Spring Boot, testing and concurrency skills employers test, interview questions, pay and a plan.
- Career guidesHow to get a full-stack developer job in 2027: what "full stack" really means to employers, and how to prove itHow to get a full-stack developer job in 2027: front-end, back-end and deployment skills employers test, the interview loop, pay and a plan.
- Career guidesGraphQL interview questions and jobs in 2027: schemas, resolvers, N+1 and the production concerns employers testGraphQL interview questions and jobs in 2027: schema design, queries and mutations, resolvers and N+1, pagination, security limits and federation, with answers.
Get the ideas, not the noise.
Sign up with Google and we’ll send you short UX psychology tips by email — why people tap, stall and leave, and what to do about it. Unsubscribe anytime. Prefer something to keep? Get the free Laws of UX guide as a PDF.
You've read the playbook. Now prove it.
Take the free HTML and CSS Fundamentals Certification and earn HTML and CSS Fundamentals (SOA-HTML). Free, test-based certifications graded on our server. Pass and you get a founder-signed certificate with a credential ID and QR code employers can verify.






