HTML, CSS, JavaScript Interview Questions
1. What are semantic HTML elements? Give examples.
2. How does the CSS box model work?
3. What is the difference between == and === in JavaScript?
4. Explain event delegation in JavaScript.
5. What is the purpose of the 'defer' and 'async' attributes in script tags?
6. How does specificity work in CSS?
7. Describe the difference between inline, inline-block, and block elements.
8. What are closures in JavaScript? Provide an example.
9. How can you improve the performance of a website?
10. Explain the difference between localStorage, sessionStorage, and cookies.
11. What is the difference between 'visibility: hidden' and 'display: none'?
12. Explain how flexbox and grid systems work in CSS.
13. What is hoisting in JavaScript?
14. How does prototypal inheritance work in JavaScript?
15. What are data attributes in HTML and how are they used?
16. How can you center a div both vertically and horizontally using CSS?
17. Explain the difference between var, let, and const in JavaScript.
18. What is a promise in JavaScript and how do you use it?
19. What is the difference between synchronous and asynchronous code?
20. What are the different types of positioning in CSS?