100 HTML Multiple-Choice Questions (MCQs) — Test Your Knowledge
Practice these 100 HTML MCQs to test your basics to advanced knowledge. Click Show Answer to reveal the correct option. Use this for studying, quizzes, or classroom exercises.
1. Which tag defines the root of an HTML document?
Answer: C. <html>
2. Which tag is used to create a hyperlink?
Answer: B. <a>
3. Which attribute specifies the URL in <a> tag?
Answer: C. href
4. Which tag is used to display an image?
Answer: A. <img>
5. The correct HTML element for the largest heading is:
Answer: C. <h1>
6. Which tag places content in the browser title bar?
Answer: B. <title>
7. Which HTML attribute is used to define inline styles?
Answer: A. style
8. Which element is used for an unordered list?
Answer: B. <ul>
9. The <li> tag defines a:
Answer: B. List item
10. Which tag is used to create a table?
Answer: A. <table>
11. Which tag defines a table row?
Answer: B. <tr>
12. Which tag is used for table header cell?
Answer: B. <th>
13. Which tag is used to define a paragraph?
Answer: A. <p>
14. Which tag is used for an ordered list?
Answer: B. <ol>
15. Which tag is used to define a description list?
Answer: A. <dl>
16. Which attribute adds alternative text to an image?
Answer: B. alt
17. Which tag is used to embed audio?
Answer: A. <audio>
18. Which tag is used to embed video?
Answer: B. <video>
19. The <meta> tag is used for:
Answer: A. Adding meta information
20. Which attribute makes a link open in new tab?
Answer: C. target="_blank"
21. Which input type allows multiple lines of text?
Answer: B. <textarea>
22. Which form element is used to select one of many options?
Answer: B. <select>
23. Which attribute specifies an input name sent to server?
Answer: B. name
24. Which tag is used to include JavaScript?
Answer: B. <script>
25. The correct way to comment in HTML is:
Answer: C. <!-- comment -->
26. Which tag is semantic for primary navigation?
Answer: A. <nav>
27. Which meta tag sets character encoding?
Answer: B. <meta charset="UTF-8">
28. Which tag is used for page footer?
Answer: B. <footer>
29. Which tag is used to group form controls?
Answer: A. <fieldset>
30. Which attribute is used to disable an input?
Answer: B. disabled
31. Which tag is used to define a division or a section?
Answer: D. Both A and B
32. Which tag is inline by default?
Answer: B. <span>
33. Which tag provides a tooltip text on hover?
Answer: A. title attribute
34. Which tag is used for self-closing elements like <br>?
Answer: A. Void elements
35. Which tag is used to define a clickable area on an image map?
Answer: A. <area>
36. What does the <canvas> element do?
Answer: A. Draw graphics via scripting
37. Which attribute is used to specify the relationship of the linked document?
Answer: A. rel
38. Which tag is used for embedding external content like maps?
Answer: D. All of the above
39. Which attribute is used with <form> to specify where to send form-data?
Answer: A. action
40. Which <input> type is used to upload files?
Answer: A. type="file"
41. Which attribute is used to specify a checkbox state as checked by default?
Answer: A. checked
42. Which attribute provides a short hint that describes the expected value of an input?
Answer: C. placeholder
43. Which HTML element is used to specify a footer for a document or section?
Answer: B. <footer>
44. Which tag represents a self-contained composition in a document?
Answer: B. <article>
45. Which tag is used to embed SVG content?
Answer: A. <svg>
46. Which attribute is required for accessibility to describe an image?
Answer: B. alt
47. Which attribute is used to define the text direction?
Answer: A. dir
48. Which attribute specifies visible input value inside a button?
Answer: A. value
49. Which tag marks the beginning of the document head section?
Answer: A. <head>
50. Which tag is used to define contact information for the author?
Answer: A. <address>
51. Which attribute specifies image source for <img>?
Answer: A. src
52. Which tag defines a caption for a <table>?
Answer: A. <caption>
53. Which tag is used to embed a video from YouTube?
Answer: B. <iframe>
54. Which attribute adds a tooltip to any element?
Answer: C. title
55. Which tag is used to create a checkbox?
Answer: A. <input type="checkbox">
56. Which attribute defines media queries for responsive design?
Answer: B. media
57. Which tag is used to link CSS file?
Answer: B. <link rel="stylesheet">
58. Which tag reads the character set of the document?
Answer: A. <meta charset>
59. Which attribute is used to make a form send data using POST method?
Answer: B. method="post"
60. Which tag is used to define an abbreviation?
Answer: A. <abbr>
61. Which is correct way to create a line break?
Answer: A. <br>
62. Which tag is used to define emphasized text?
Answer: D. Both A and B
63. Which attribute is used to set language of a document?
Answer: D. Both A and B
64. Which tag is used to group a set of <option> elements?
Answer: B. <optgroup>
65. Which tag is used to define a subscript?
Answer: A. <sub>
66. Which tag is used to define a superscript?
Answer: B. <sup>
67. Which tag is used to display preformatted text?
Answer: A. <pre>
68. Which tag is used to define keyboard input?
Answer: A. <kbd>
69. Which tag is used to define sample output?
Answer: C. <samp>
70. Which attribute prevents a form from being submitted?
Answer: A. novalidate
71. Which tag is used for an interactive form control that submits data?
Answer: C. Both A and B
72. Which tag would you use for marked/highlighted text?
Answer: A. <mark>
73. Which attribute is used to preload video data?
Answer: A. preload
74. Which attribute is used with <audio> to loop playback?
Answer: B. loop
75. Which attribute is used to provide subtitles to <video>?
Answer: B. <track>
76. Which element represents a caption for an iframe?
Answer: C. No specific caption element (use <figure> & <figcaption> if needed)
77. Which attribute indicates that an input field must be filled out?
Answer: A. required
78. Which tag is used to embed an external SVG file?
Answer: D. All of the above
79. Which tag can be used to define navigation breadcrumbs?
Answer: D. All of the above
80. Which attribute indicates that an input should have focus when page loads?
Answer: A. autofocus
81. Which tag is used to embed a CSS stylesheet inside HTML?
Answer: B. <style>
82. Which attribute in <table> adds a summary (deprecated)?
Answer: B. summary (deprecated)
83. Which attribute is used to set default value for <input>?
Answer: B. value
84. Which tag defines a block of quoted text from another source?
Answer: B. <blockquote>
85. Which attribute sets the size of text input in chars?
Answer: B. size
86. Which tag is used to define a caption for an image?
Answer: A. <figcaption>
87. Which attribute indicates input type is password?
Answer: A. type="password"
88. Which tag is used to group media (image + caption)?
Answer: B. <figure>
89. Which tag defines a navigation list for search engines (sitemap)?
Answer: D. None (sitemaps are XML)
90. Which attribute indicates that an image is decorative and should be ignored by screen readers?
Answer: D. All of the above
91. Which attribute is used to specify a download for a link?
Answer: A. download
92. Which attribute is used to prevent content from being selectable?
Answer: A. user-select: none (CSS)
93. Which tag is used to define a progress bar?
Answer: A. <progress>
94. Which tag is used to define a gauge (value within a range)?
Answer: B. <meter>
95. Which attribute is used to add ARIA role for accessibility?
Answer: A. role
96. Which tag is used to include a favicon?
Answer: A. <link rel="icon" href="favicon.ico">
97. Which HTML attribute is used to apply inline JavaScript to an element event?
Answer: A. onclick
98. Which tag is used to get user input for numeric range?
Answer: A. <input type="range">
99. Which tag is used for embedding external scripts (like analytics)?
Answer: A. <script src="...">
100. Which doctype declaration is correct for HTML5?
Answer: B. <!DOCTYPE html>
Tip: Use these MCQs to test yourself or your students. Click "Show All Answers" to reveal all and study quickly.

Comments
Post a Comment