Interview-questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

HTML Questions

1. What are semantic HTML elements, and why are they important?
2. What is the purpose of the `<doctype>` declaration?
3. Explain the difference between inline, block, and inline-block elements.
4. What is the difference between `<div>` and `<span>` elements?
5. What are meta tags, and why are they important for SEO?
6. What is the difference between absolute and relative URLs?
7. What is lazy loading, and how is it implemented in HTML for images?
8. What are the new input types introduced in HTML5?
9. How do the `async` and `defer` attributes work on a `<script>` tag?
10. What is the purpose of the `alt` attribute in the `<img>` tag?

CSS Questions

1. What is the difference between relative, absolute, fixed, and sticky positioning in CSS?
2. How does the CSS box model work?
3. What is the difference between `em`, `rem`, and `px` units in CSS?
4. What is the difference between `visibility: hidden` and `display: none`?
5. What is the z-index in CSS, and how does it work?
6. What are pseudo-classes and pseudo-elements? Provide examples.
7. Explain the difference between CSS Grid and Flexbox.
8. How are CSS Grid and Flexbox used together?
9. What are media queries in CSS, and how are they used for responsive design?
10. What is the difference between inline styles, internal styles, and external stylesheets?
11. What are keyframes in CSS, and how are they used for animations?

JavaScript Questions
1. What is the difference between `var`, `let`, and `const` in JavaScript?
2. What is the difference between `==` and `===`?
3. What are closures in JavaScript, and how do they work?
4. What is the purpose of `this` in JavaScript? How does it behave in different contexts?
5. What is the difference between synchronous and asynchronous programming in JavaScript?
6. What is the purpose of promises, and how do they differ from callbacks?
7. How do `async` and `await` simplify working with promises?
8. What is the event loop in JavaScript, and how does it work?
9. How does JavaScript handle hoisting?
10. What is the difference between `map()`, `filter()`, and `reduce()` in JavaScript?
11. What are JavaScript modules, and how are they used?
12. What is the difference between `setTimeout` and `setInterval`?
13. What are event delegation and bubbling in JavaScript?
14. What is the purpose of `Object.freeze` and `Object.seal` in JavaScript?
15. How do you debounce and throttle functions in JavaScript?
16. How are JavaScript's promises, callbacks, and `async/await` related?

React Questions

1. What is React, and what are its main features?


2. What is the virtual DOM, and how does it differ from the real DOM?
3. What are React components, and how are they classified?
4. What is JSX, and why is it used in React?
5. What are hooks in React? Explain the purpose of the `useState` and `useEffect` hooks.
6. What is the purpose of keys in a list in React, and why should they be unique?
7. What is the difference between props and state in React?
8. What are higher-order components (HOCs) in React? Provide an example.
9. What is the purpose of `React.memo`, and how does it optimize performance?
10. What is the Context API in React, and when should you use it?
11. What is React's `useReducer` hook, and how does it differ from `useState`?
12. What is server-side rendering (SSR) in React, and why is it important?
13. What is React's `Suspense` component, and how does it work?
14. What are React portals, and when should you use them?
15. How does React's `useContext` hook differ from the Context API?
16. What is Redux, and how does it work with React?

You might also like