Interview questions and answers
Interview question banks organised by topic and difficulty. Every answer starts with a short version you can say in an interview, then explains the concept with a code example, common mistakes and a tip.
HTML Interview Questions
10 modules · 100 questions
100 HTML interview questions with answers for freshers and experienced developers: semantic HTML, forms, accessibility, SEO metadata, media and browser concepts.
Topics covered
HTML Fundamentals · HTML Elements and Attributes · Links, Images and Media · Lists and Tables · HTML Forms and Validation · Semantic HTML · Metadata, SEO and Document Structure · Accessibility and Best Practices · Advanced HTML and Browser Concepts · Practical and Scenario-Based Questions
View questionsCSS Interview Questions
10 modules · 100 questions
100 CSS interview questions with answers: specificity, the box model, Flexbox, CSS Grid, positioning, responsive design, animations and modern CSS.
Topics covered
CSS Fundamentals · Selectors, Specificity and the Cascade · Box Model and Units · Display, Positioning and Stacking · Flexbox · CSS Grid · Responsive Design · Typography, Colors and Theming · Animations, Performance and Modern CSS · Practical Webvoid Scenarios
View questions
How to prepare with interview questions
Do not try to memorise answers word for word. Read the question, say your own answer out loud, then compare it with the explanation and note what you missed. Interviewers follow up with "why?" and "what would happen if…?", and only an answer you understand survives those follow-ups.
Work topic by topic. Start with the Beginner questions in the fundamentals modules, then move to the Intermediate and Advanced ones. Revisit your notes the day before the interview, and try the code examples yourself in an HTML, CSS and JavaScript editor so you can explain what they do.
What frontend interviews usually cover
For HTML: semantic elements, forms and validation, accessibility, metadata and SEO, and how the browser loads and renders a page. For CSS: the cascade and specificity, the box model, positioning and stacking, Flexbox and Grid, responsive design and performance. Expect at least one practical question where you build or debug a small layout.
Frequently asked questions
- How many interview questions should I practise?
- Depth beats volume. Being able to explain the 30 to 50 most common questions for your stack clearly, with examples, is more useful than skimming hundreds.
- Are these interview questions suitable for freshers?
- Yes. Every question is tagged Beginner, Intermediate or Advanced, so freshers can start with the fundamentals and experienced developers can go straight to the advanced topics.
- How should I answer a question I do not know?
- Say what you do know about the topic, reason through it out loud, and explain how you would find the answer. Interviewers value clear thinking more than a memorised definition.