Frontend Development Interview Questions for Freshers
1. HTML Questions
- What is HTML? Explain its basic structure.
- What is the difference between <div> and <span>?
- What are semantic HTML tags? Give examples.
- What is the purpose of the alt attribute in an <img> tag?
- How do you create a hyperlink in HTML?
- What is the difference between id and class?
2. CSS Questions
- What is the difference between inline, internal, and external CSS?
- Explain the box model in CSS.
- What is specificity in CSS?
- What are pseudo-classes in CSS? Give examples.
- What is the difference between position: relative, absolute, fixed, and sticky?
- What are media queries? How are they useful?
3. JavaScript Basics
- What is JavaScript and how is it used in web development?
- Explain var, let, and const.
- What is the difference between == and ===?
- What are functions in JavaScript?
- What are events in JavaScript? How do you handle them?
- What is a callback function?
4. DOM Manipulation
- What is the DOM?
- How do you select elements in the DOM using JavaScript?
- How do you change the content of an HTML element using JavaScript?
- What is event delegation?
5. Responsive Design
- What is responsive design?
- How do you make a website mobile-friendly?
- Difference between em, rem, %, px units in CSS?
6. Version Control (Git Basics)
- What is Git and why is it used?
- What is the difference between git pull and git fetch?
- What does git clone do?
- How do you resolve merge conflicts?
7. General & Conceptual Questions
- What is the difference between frontend and backend development?
- What is the role of a frontend developer?
- Which frontend frameworks or libraries do you know?
- What is the difference between progressive enhancement and graceful degradation?
8. Optional - Framework-related (React.js for example)
- What is React?
- What is a component in React?
- Difference between functional and class components.
- What are props and state?
- What is JSX?