๐น HTML Basics (1โ15)
1. What is HTML?
HTML (HyperText Markup Language) is used to create the structure of web pages.
2. What is a tag?
A tag is a keyword enclosed in angle brackets < > used to define HTML elements.
3. What is an element?
An element consists of opening tag + content + closing tag.
4. What is an attribute?
Attributes provide extra information about elements.
<img src="img.jpg" alt="image">
5. Difference between HTML and HTML5?
HTML5 supports audio, video, canvas, semantic tags, and APIs.
6. What are semantic elements?
Tags that describe meaning of content (<header>, <footer>, <article>).
7. Why use semantic tags?
Improves SEO, accessibility, and readability.
8. What is DOCTYPE?
Defines HTML version for browser.
9. What is <head> tag?
Contains metadata (title, CSS, SEO info).
10. What is <body> tag?
Contains visible content of web page.
11. What is comment in HTML?
<!-- Comment -->
12. What is inline element?
Does not start on new line (<span>, <a>).
13. What is block element?
Starts on new line (<div>, <p>).
14. Difference between <div> and <span>?
- div โ block
- span โ inline
15. What is empty tag?
Tag without closing tag (<br>, <img>).
๐น HTML Forms & Media (16โ30)
16. What is form?
Used to collect user input.
17. Important form attributes?
action, method, name
18. GET vs POST?
- GET โ visible data
- POST โ secure data
19. What is input type?
Defines input field (text, email, password).
20. What is placeholder?
Shows hint text in input field.
21. What is label tag?
Associates text with input field.
22. What is required attribute?
Makes field mandatory.
23. What is iframe?
Embeds another webpage.
24. What is <audio> tag?
Used to play audio files.
25. What is <video> tag?
Used to play video files.
26. What is canvas?
Used for drawing graphics via JavaScript.
27. What is SVG?
Vector-based graphics format.
28. Difference between SVG & Canvas?
SVG โ XML-based
Canvas โ pixel-based
29. What is alt attribute?
Displays text if image fails & helps SEO.
30. What is marquee?
Scrolling text tag (deprecated).
๐น HTML Advanced & SEO (31โ50)
31. What is meta tag?
Provides SEO & page information.
32. Important meta tags?
charset, viewport, description
33. What is viewport meta tag?
Controls responsive layout.
34. What is accessibility?
Making websites usable for all users.
35. What is ARIA?
Improves accessibility for screen readers.
36. What is data-* attribute?
Stores custom data.
37. What is responsive image?
Image that adapts to screen size.
38. What is picture tag?
Loads different images based on device.
39. What is lazy loading?
Loads images only when needed.
40. What is favicon?
Website icon shown in browser tab.
41. What is SEO-friendly HTML?
Clean structure, semantic tags, proper headings.
42. What is heading hierarchy?
Proper use of h1โh6.
43. What is web storage?
localStorage & sessionStorage.
44. What is HTML entities?
Special characters ( , <).
45. What is pre tag?
Displays preformatted text.
46. What is noscript?
Shown when JavaScript is disabled.
47. What is progressive enhancement?
Basic functionality first, advanced later.
48. What is deprecated tag?
Tags no longer supported.
49. What is W3C?
Web standards organization.
50. Why HTML is important?
HTML is the foundation of every website ๐