🌙
Happy Karwa Chauth! Wishing all couples a blessed Karwa Chauth. May your bond grow stronger every year. From Team Job...
💬 Share
Web Development Tutorials

Web Developer Interview Questions (India): 30 Common Questions With Short Answers

Preparing for a web developer interview? Here are 30 common questions asked in Indian companies, with short answers and tips for practical rounds.

In this article · 7 sections
  1. HTML and CSS
  2. JavaScript
  3. PHP and MySQL
  4. Web fundamentals
  5. Tools and practice
  6. Practical round tips
  7. FAQs
  8. Do they ask DSA for web roles?
  9. How should freshers prepare?

Interviews for junior and mid-level roles in India usually mix basic theory, a few practical questions and often a small coding task. These web developer interview questions cover what's asked most, with short answers to revise from.

HTML and CSS

  1. What is semantic HTML? Tags that describe meaning (header, nav, main, article) for SEO and accessibility. See semantic HTML
  2. Difference between id and class? An id is unique on a page; classes are reusable
  3. What is the box model? Content + padding + border + margin; box-sizing: border-box includes padding and border in the width
  4. Flexbox vs Grid? Flexbox for one-dimensional layouts, Grid for two-dimensional. See Flexbox vs Grid
  5. How do you make a site responsive? Fluid layouts, media queries, flexible images, mobile-first CSS
  6. What is specificity? Rules deciding which CSS wins: inline > id > class > element

JavaScript

  1. let vs const vs var? let/const are block-scoped; const can't be reassigned; var is function-scoped and older
  2. == vs ===? === compares value and type; prefer it
  3. What is a closure? A function that remembers variables from its outer scope
  4. What is event delegation? One listener on a parent handles events from children using event.target
  5. What are promises and async/await? Ways to handle asynchronous work like fetch requests. See fetch tutorial
  6. What is debouncing? Delaying a function until input pauses, used for live search
  7. How do you avoid XSS when inserting text? Use textContent, escape output, and validate on the server

PHP and MySQL

  1. GET vs POST? GET sends data in the URL (for reading); POST sends it in the body (for submitting)
  2. Sessions vs cookies? Sessions store data on the server with an ID cookie; cookies store data in the browser
  3. How do you prevent SQL injection? Prepared statements with bound parameters. See PHP security
  4. How should passwords be stored? password_hash() and password_verify(). See secure login tutorial
  5. include vs require? require stops with a fatal error if the file is missing; include gives a warning
  6. What is a JOIN? Combines rows from related tables. See SQL joins
  7. What is an index? A structure that speeds up searches on columns, at some cost to writes
  8. What is normalisation? Organising tables to reduce duplication

Web fundamentals

  1. What happens when you type a URL? DNS lookup, TCP/TLS connection, HTTP request, server response, browser rendering
  2. What is a REST API? Resource URLs with HTTP methods returning JSON. See REST API explained
  3. Common status codes? 200, 201, 301, 302, 400, 401, 403, 404, 500
  4. What is CORS? A browser rule controlling which origins can call your API
  5. HTTP vs HTTPS? HTTPS encrypts traffic with TLS
  6. How do you improve page speed? Optimised images, caching, minified assets, fewer requests, CDN, fast server response

Tools and practice

  1. Basic Git commands? clone, add, commit, push, pull, branch, merge. See Git basics
  2. How do you debug? DevTools Console and Network, error logs, breakpoints. See DevTools guide and debugging PHP errors
  3. Tell us about a project you built. Explain the problem, your role, technical choices, challenges and results

Practical round tips

  • Common tasks: a CRUD app, form with validation, API fetch and display, or fixing a bug in existing code
  • Think aloud and write readable code; handle errors and edge cases
  • Have live project links and a clean GitHub ready

FAQs

Do they ask DSA for web roles?

Product companies often do; agencies focus on practical skills.

How should freshers prepare?

Build 3–5 real projects, revise these basics, and practise explaining your code. See web developer roadmap.

Was this article helpful?

Your answer helps us improve our guides

Share this article

Joboo Web

Web design, SEO & digital marketing team · Ludhiana, Punjab

Joboo Web has helped Indian businesses grow online since 2019 — building fast websites and running SEO, Google Ads and social campaigns for clients in 80+ cities. About us →

Keep reading

💬