Posted On November 24, 2025

100 HTML Interview Questions & Answers

patil.sandip2490@gmail.com 0 comments
>> Uncategorized >> 100 HTML Interview Questions & Answers

 

1. What is HTML?

HTML = HyperText Markup Language for creating web pages.

2. What is a tag?

An HTML command inside < >.

3. What is an element?

Start tag + content + end tag.

4. What is HTML5?

Latest version of HTML with new semantic tags.

5. What is a semantic tag?

Describes meaning (e.g., <header>, <footer>).

6. What is DOCTYPE?

Declares HTML document type.

7. What is <meta> used for?

Metadata like charset, viewport.

8. What is <link> tag?

Connects external CSS.

9. What is <script> tag?

Embeds JavaScript.

10. Difference between <div> and <span>?

  • div = block

  • span = inline

11. What is <iframe>?

Embeds another webpage.

12. What is <canvas>?

Used for drawing graphics.

13. Block-level elements?

<div>, <p>, <h1>

14. Inline elements?

<span>, <a>, <img>

15. What is an attribute?

Additional property for tags.

16. What is alt attribute?

Alternative text for image.

17. What is a form?

Used for user input.

18. Types of input fields?

text, password, email, checkbox, radio, file…

19. What is placeholder?

Hint text inside input.

20. What is <label>?

Connects text with input.

21. What is validation?

Checking input correctness.

22. ID vs Class?

ID = unique, Class = reusable.

23. What is data-* attribute?

Stores custom data.

24. What is <audio>?

Embed audio.

25. What is <video>?

Embed video.

26. What is <source>?

Multiple audio/video sources.

27. What is <svg>?

Vector images.

28. What is favicon?

Icon displayed in browser tab.

29. Difference between <strong> & <b>?

strong = semantic, b = bold only.

30. Difference between <em> & <i>?

em = emphasis, i = italic style.

31. What are void elements?

Self-closing: <br/>, <img/>.

32. What is ARIA?

Accessibility attributes.

33. Viewport meta tag?

For responsive design.

34. What is Lazy Loading?

Loads images when needed.

35. What is download attribute?

Downloads files via link.

36. Difference <ul> vs <ol>?

ul = bullets
ol = numbers

37. What are HTML entities?

Special characters like &lt;.

38. <progress> tag use?

Progress bar.

39. What is <details>?

Expandable content.

40. What is <summary>?

Title for details.

41. What is <mark>?

Highlights text.

42. What is <time>?

Machine-readable date/time.

43. Purpose of <base> tag?

Default URL for links.

44. What is Web Storage?

localStorage & sessionStorage.

45. Deprecated HTML tags?

<font>, <center>, <marquee>

46. What are comments?

<!-- comment -->

47. What is SEO-friendly HTML?

Semantic tags + alt + headings.

48. Difference href vs src?

href = reference link, src = embed file.

49. What is DOM?

Tree structure of HTML.

50. What is DOM Manipulation?

Changing HTML via JS.

51. What is HTML parser?

Browser engine that reads HTML.

52. What is character encoding?

Representation of characters (UTF-8).

53. What is <nav> tag?

Navigation links container.

54. What is <header>?

Top section of page.

55. What is <footer>?

Bottom section of page.

56. What is <article>?

Self-contained content.

57. What is <section>?

Logical section of content.

58. What is <aside>?

Sidebar content.

59. What is <main>?

Main page content.

60. What is Accessibility (A11y)?

Make site usable for all.

61. What is Tab Index?

Controls tab navigation.

62. What is autofocus attribute?

Sets input focus automatically.

63. What is autocomplete?

Browser suggests input values.

64. What is required attribute?

Makes field mandatory.

65. What is pattern attribute?

Regex for validation.

66. Difference between GET & POST (forms)?

GET = URL
POST = body

67. What is enctype?

Encoding type for forms.

68. HTML media tags?

audio, video, source, track.

69. What is <track>?

Captions/subtitles for video.

70. What is <figure>?

Self-contained content block.

71. What is <figcaption>?

Caption for figure.

72. What is <code> tag?

Displays code.

73. What is <pre> tag?

Preformatted text.

74. What is <small> tag?

Smaller text.

75. What is <sup> & <sub>?

Super/subscript.

76. What is <hr>?

Horizontal line.

77. What is <address>?

Contact info.

78. What is <q> tag?

Short inline quotation.

79. What is <blockquote>?

Long quotations.

80. What is <abbr>?

Abbreviations.

81. What is <bdi>?

Text direction isolation.

82. What is <bdo>?

Overrides text direction.

83. What is <wbr>?

Suggested line break.

84. What is contenteditable?

Make element editable.

85. What is spellcheck?

Check spelling in editable content.

86. What is <meta charset="UTF-8">?

Defines Unicode encoding.

87. What is <meta http-equiv>?

Defines caching/refresh rules.

88. What is <style> tag?

Write CSS inside HTML.

89. Inline CSS?

<p style="color:red">

90. External CSS?

Link via <link> tag.

91. Internal CSS?

Inside <style>.

92. What is HTML Boilerplate?

Basic HTML page structure.

93. What is <title> tag?

Page title in browser.

94. What is <noscript>?

Shown when JS disabled.

95. What is <template> tag?

Hidden HTML reusable block.

96. What is <dialog>?

Popup dialog box.

97. What is <embed>?

Embed external interactive content.

98. What is <object>?

Embed multimedia or documents.

99. What is <param>?

Parameters for <object>.

100. Difference between HTML & XHTML?

XHTML is stricter and uses XML rules.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Noise Pulse Hyper Smart Watch – Rose Pink

Product Highlights Stylish • Smart • Powerful Upgrade your lifestyle with the premium Noise Pulse…

Abacus Questions with Answers for LKG Students

1. Number Recognition (0–10)What number is this? 0Answer: ZeroWhat number comes after 2?Answer: 3What number…

Toyzone Mini Bulldozer 50803 – Fun Ride-On Car for Kids!

Looking for a fun, safe, and exciting ride-on toy for your child? The Toyzone Mini…