30 HTML Interview Questions
1. What is HTML?
2. What are tags in HTML?
3. What is the difference between HTML and HTML5?
4. What are semantic HTML elements?
5. What is the purpose of the <!DOCTYPE html> declaration?
6. What is the difference between <div> and <span>?
7. How do you create a hyperlink in HTML?
8. What is the difference between id and class attributes?
9. How do you insert an image in HTML?
10. What are self-closing tags in HTML?
11. What is the purpose of the <meta> tag?
12. What are the different types of lists in HTML?
13. What is the use of the <form> element in HTML?
14. How can you make a table in HTML?
15. What is the difference between <strong> and <b>, or <em> and <i>?
15 CSS Interview Questions
16. What is CSS and why is it used?
17. What are the different types of CSS?
18. What is the difference between id and class in CSS?
19. What is the Box Model in CSS?
20. What is the difference between relative, absolute, and fixed positioning?
21. What are pseudo-classes in CSS?
22. How does specificity work in CSS?
23. What is the difference between em, rem, and px units in CSS?
24. What is a media query in CSS?
25. How can you center a div using CSS?
26. What is the difference between visibility: hidden and display: none?
27. What is Flexbox in CSS?
28. What is the difference between inline, block, and inline-block elements?
29. How can you apply styles to multiple classes in one rule?
30. What is the z-index property used for?