Skip to content
InterviewEra
What is InterviewEraThe platform, founder, and missionHow It WorksAdaptive interview, live captions, scoringResume-aware ScoringCV-native questions + 5-dimension feedback
Campus Placements OverviewStructured mock interviews and cohort analytics for T&P teamsSet up Campus WorkspaceCreate your campus dashboard and invite your batchT&P Product & PricingPilot pricing, bulk onboarding, and placement trackingStudent Invitation HelpHow to accept a campus invite and start practising
Software EngineerDSA, system design, OOP roundsFrontend DeveloperReact, HTML/CSS, JavaScript interviewsTCS Interview QuestionsNQT + technical + HR roundsWipro Careers HubNLTH, WILP, Turbo hiring tracksSolera Careers HubCognitive assessment + Java/SQL roundsReact Interview QuestionsHooks, state, performance topics
Interview Question GeneratorRole-specific questions in secondsATS Resume CheckerScore your resume against job rolesSTAR Answer BuilderStructure behavioral answers clearly
All ResourcesCentral guide and hub directoryBlogInterview prep articles and guidesAgentic AI Interview GuideAI-assisted coding interviews, rubrics, and prepPlacement GuideStep-by-step campus prep playbookSTAR Method GuideMaster behavioral answers
Help CenterGuides, FAQs, and supportDSA Topic MapPatterns, roadmap, and top 50 problemsSoftware Engineer GuideSWE questions and prep hubAndroid GuideKotlin, Compose, MVVM prep hubFrontend GuideReact and JavaScript interviews
PricingFor Teams
Sign inSign up
InterviewEra

InterviewEra is an AI-powered mock interview platform with adaptive follow-ups, resume-aware scoring, and structured interview preparation for campus placements and early-career hiring.

Start Mock Interview

Mock Interview

  • How It Works
  • For Teams
  • Start Mock Interview
  • Campus Placements
  • Campus Workspace
  • Help Center

Free Tools

  • Interview Question Generator
  • ATS Resume Checker
  • STAR Answer Builder

Interview Questions

  • Wipro Careers Hub
  • Solera Careers Hub
  • Amazon SDE Questions
  • Microsoft SDE Questions
  • Infosys SWE Questions
  • Infosys Java Questions
  • Freshworks Frontend Questions
  • Android Developer Questions
  • Frontend Developer Questions
  • Java Developer Questions

Resources

  • Community Hub
  • All Resources
  • Blog
  • Agentic AI Interview Guide
  • What Is Agentic AI
  • Agentic Coding Round
  • AI Prompt Engineering
  • Cursor AI Interview Guide
  • DSA Topic Map
  • Placement Guide
  • STAR Guide
  • HR Guide
  • Interview Tips

Company

  • What is InterviewEra
  • About Us
  • Pricing
  • Contact

© 2026 InterviewEra. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›Topics›HTML & CSS

Frontend · Fresher-relevant

HTML & CSS Interview Questions 2026

HTML and CSS interview questions on semantic markup, Flexbox, Grid, specificity, and responsive design fundamentals.

FrontendFresher-relevant

HTML & CSS Interview Questions

Placement-oriented · Updated 2026
  1. 01

    What is the CSS box model?

    TechnicalEasy

    Tip: Every element is a box of content, padding, border, and margin. box-sizing: content-box (default) sizes only the content with width; border-box includes padding and border in the declared width — most developers set border-box globally for predictable layouts.

  2. 02

    Explain Flexbox vs CSS Grid and when to use each.

    TechnicalMedium

    Tip: Flexbox is one-dimensional (a row or a column) — ideal for navbars, toolbars, and distributing items along an axis. Grid is two-dimensional (rows and columns together) — ideal for page and card layouts. They compose: Grid for the macro layout, Flexbox within cells.

  3. 03

    How does CSS specificity work?

    TechnicalMedium

    Tip: Specificity is scored as inline > id > class/attribute/pseudo-class > element. Higher specificity wins; ties go to the later rule. !important overrides normal rules (avoid it). Keep selectors low-specificity so they stay overridable and maintainable.

  4. 04

    What is the difference between position relative, absolute, fixed, and sticky?

    TechnicalMedium

    Tip: relative offsets an element from its normal spot while keeping its space. absolute removes it from flow and positions it against the nearest positioned ancestor. fixed positions against the viewport. sticky toggles between relative and fixed based on scroll within its container.

  5. 05

    Why does semantic HTML matter?

    TechnicalEasy

    Tip: Tags like header, nav, main, article, and footer convey meaning to assistive tech and search engines, improving accessibility and SEO. Use heading levels in order, label form controls, and reserve div/span for styling-only wrappers.

  6. 06

    How do you make a layout responsive?

    TechnicalMedium

    Tip: Use fluid units (%, rem, fr, min/max), media queries at content-driven breakpoints, mobile-first defaults, and flexible images (max-width:100%). Modern CSS adds clamp() for fluid type and container queries to respond to a component's own size.

  7. 07

    What is the difference between display none, visibility hidden, and opacity 0?

    TechnicalEasy

    Tip: display:none removes the element from layout and the accessibility tree (no space, not focusable). visibility:hidden hides it but keeps its space. opacity:0 makes it invisible but it still occupies space and remains interactive. Pick based on whether you need layout space and interactivity.

  8. 08

    What causes layout reflow and how do you minimise it?

    TechnicalHard

    Tip: Reflow recalculates geometry when you change layout-affecting properties or read layout (offsetHeight) interleaved with writes. Minimise by batching DOM reads then writes, animating transform/opacity (compositor-only) instead of top/left/width, and using will-change sparingly.

Practice HTML/CSS questions with your own resume

InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.

Start free mock interviewFree question generator

Roles that need HTML/CSS

  • Frontend Developer questions
  • React Developer questions
  • UI/UX Designer questions

Related frontend topics

  • JavaScript questions
  • React.js questions
  • TypeScript questions
  • Angular questions

Practice tools

  • Interview question generator
  • ATS resume checker
  • STAR answer builder

Guides and resources

  • All interview questions
  • HR interview answer tips
  • STAR method with examples