Landing a web development role at Infosys—a global leader in IT services—requires sharp technical skills and strategic preparation. Whether you’re a fresh graduate or an experienced developer, Infosys interviews test your foundational knowledge, problem-solving abilities, and real-world application. In this guide, we’ll break down the most common web development questions asked at Infosys, along with sample answers and insider tips to help you stand out.
Core Topics Covered
- Infosys web developer interviews typically focus on these pillars:
- HTML/CSS Fundamentals
- JavaScript & DOM Manipulation
- Responsive Design
- Basic Backend/API Concepts
- Problem-Solving & Debugging

25 Infosys Web Development Interview Questions & Answers
HTML/CSS Fundamentals
Q1: Explain the CSS Box Model.
A: Every HTML element is a rectangular box with 4 layers: content (innermost), padding (space around content), border, and margin (outer space between elements).
Q2: What's the difference between display: none and visibility: hidden?
A: display: none removes the element from the layout flow (no space reserved), while visibility: hidden hides the element but reserves its space.
Q3: How do you center a <div> horizontally and vertically?
A: Use flexbox:
- css
- Copy
- Download
- .container {
- display: flex;
- justify-content: center;
- align-items: center;
Q4: What are semantic HTML tags? Why use them?
A: Tags like <header>, <nav>, <section>, and <article> describe content meaning (improves SEO, accessibility, and code readability).
Q5: Explain CSS specificity.
A: A scoring system determining which style rules apply when conflicts occur:
- !important > inline styles > IDs > classes > elements.
Recommended Reads: Full Stack Developer Interview Questions
JavaScript & DOM
Q1: What is closure in JavaScript?
A: A function retaining access to its outer lexical scope even after execution. Example:
javascript
function outer() {
const message = "Hello";
function inner() {
console.log(message);
}
return inner;
}
const innerFunc = outer();
innerFunc(); // "Hello"
Q2: Differentiate let, const, and var.
A: var: Function-scoped, hoisted.
let: Block-scoped, reassignable.
const: Block-scoped, immutable after initialization.
Q3: What is event delegation?
A: Attaching an event listener to a parent element to handle events for multiple children (e.g., dynamic lists). Improves performance.
Q4: Explain promises vs. async/await.
A:Promises: .then() and .catch() for asynchronous operations.
Async/await: Syntactic sugar over promises using async functions and await keywords for cleaner code.
Q5: How does this work in JavaScript?
A: Refers to the context owner:
Global: window (non-strict mode).
Object method: The object itself.
Arrow function: Inherits from the parent scope.
Q6: How does == differ from === in JavaScript?
A: == checks value (with type coercion), while === checks value and type.
Q7: How would you handle CORS errors?
A: On the server, set headers like:
http
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST
Responsive Design
Q1: How do media queries work?
A: Apply CSS rules based on device characteristics (e.g., screen width):
css
@media (max-width: 768px) {
container { padding: 10px; }
}
Q2: What are CSS Flexbox and Grid?
A: Flexbox: 1D layouts (rows/columns).
Grid: 2D layouts (rows + columns simultaneously).
Backend & APIs
Q1: Explain RESTful API principles.
A: Uses HTTP methods:
GET (retrieve), POST (create), PUT (update), DELETE (remove).
Q2: What is session storage vs. local storage?
A: Session storage: Cleared when browser closes.
Local storage: Persists until manually cleared.
Q3: How do you secure an API?
A: Use HTTPS, authentication (JWT/OAuth), rate limiting, and input validation.
Problem-Solving & Debugging
Q1: Debug this code:
javascript
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1000);
}
A: Outputs 3 three times (due to var’s function scope). Fix: Replace var with let.
Q2: How would you optimize website performance?
A: Minify CSS/JS, compress images, lazy-load assets, enable caching, and reduce HTTP requests.
Q3: Explain CSRF attacks and prevention.
A: Attackers trick users into submitting malicious requests. Prevention: Use CSRF tokens.
Advanced Concepts
Q: What is the Virtual DOM?
A: A simplified version of the actual DOM used by React to optimize and speed up the re-rendering process.
Q: Explain MVC architecture.
A: Separates app into:
- Model (data),
- View (UI),
- Controller (logic).
Q: What is Webpack?
A: A module bundler that compiles JavaScript, CSS, and other assets into efficient, optimized bundles for better performance.
Q: How does HTTP/2 improve performance?
A: It supports multiplexing (handling multiple requests and responses over a single connection), header compression, and server push capabilities.
Q: What are Progressive Web Apps (PWAs)?
A: Web apps offering native-like experiences (offline support, push notifications, installable).
Key Areas to Focus On
- Core Concepts: HTML5, CSS3, JavaScript (ES6+).
- Frameworks: React/Angular (often asked in senior roles).
- Problem-Solving: Practice array/string manipulation on HackerRank.
- Real-World Scenarios: Be ready to explain your projects and debugging approaches.
Pro Tip:
Infosys places high importance on clear communication and structured thinking. Always keep your responses well-organized and easy to understand.
- Restate the question.
- Explain step-by-step.
- Summarize your answer.
Suggested Courses to Upskill You Before Your Infosys Interview
1. Master's as Full Stack Java Developer— This course will enhance your computer programming skills and give you an edge in Java. Being absolutely thorough in at least one programming language is a requisite for all aspiring engineers in tech-related fields.
2. Masters in Data Analytics—Data Analytics is one of the most in-demand skills in today’s job market. This course helps you master tools like Excel, SQL, Python, and Power BI. It’s a great way to upskill if you're aiming for roles that require analytical thinking and data-driven decision-making, especially in sectors like IT services, consulting, or business intelligence.
Conclusion
Preparing for a web development interview at Infosys requires more than just technical knowledge—it demands a deep understanding of core concepts, hands-on coding skills, and the ability to communicate clearly and logically. By mastering topics like HTML, CSS, JavaScript, responsive design, and backend basics, you'll be well-positioned to impress your interviewers and land the job.
Pro Advice:
- Prioritize Practicality: Complete 1–2 courses with projects (e.g., build a RESTful API or responsive dashboard).
- Time Management: Dedicate 2–3 weeks pre-interview for focused upskilling.
- Supplement with Practice: Pair courses with LeetCode (JavaScript) and CSSBattle.dev for rapid application.
Next Step:
Enroll in one course today, document your projects on GitHub, and reference them during interviews to demonstrate initiative!
Brillica Services offers the best web development course in Dehradun, designed to equip you with industry-relevant skills, real-world projects, and expert mentorship to help you crack interviews at top IT companies like Infosys.