Basic HTML Questions
1. What is HTML?
2. What are HTML tags and attributes?
3. What is the difference between <div> and <span>?
4. What is the purpose of the <!DOCTYPE html> declaration?
5. What is semantic HTML? Give examples.
6. What is the difference between block-level and inline elements?
7. What are self-closing tags? Name some.
8. What is the use of the <head> and <body> sections?
9. What is the difference between <id> and <class>?
10. What is the purpose of the <meta> tag?
⭐ Intermediate HTML Questions
11. What are <header>, <footer>, <article>, and <section> used for?
12. Explain the HTML5 form validation attributes.
13. What is the difference between <script>, <noscript> tags?
14. What is the data-* attribute used for?
15. Describe local storage vs session storage.
16. What is the difference between <link> and <a> tags?
17. How do you embed audio and video in HTML5?
18. Explain the srcset and picture elements for responsive images.
19. What is the purpose of the <canvas> element?
20. What is the difference between inline, internal, and external CSS?
⭐ Advanced HTML Questions
21. What is ARIA, and why is it important for accessibility?
22. Explain Shadow DOM and its benefits.
23. What are custom elements in HTML?
24. How does HTML5 improve browser performance?
25. What is lazy loading? How do you enable it for images and iframes?
26. Explain “content security policy” (CSP) and how it's added in HTML.
27. What are MIME types, and why do they matter?
28. What is cross-origin resource sharing (CORS)?
29. How does <iframe> sandboxing work?
30. Explain the difference between HTML parsing vs DOM construction.
⭐ HTML Coding/Practical Questions
31. Write HTML to create a responsive image.
32. Write HTML to create a table with merged cells.
33. Create a simple registration form with validation.
34. Create a navigation bar using semantic HTML.
35. How do you embed YouTube videos using HTML?