HTML - MCQ Questions and Answers

Test your knowledge of HTML with these interactive multiple-choice questions.

« First 7 8 9 10 Last »
« Previous Page Next Page »

161. Which HTML5 feature allows creating a search input field?

  • a) <input type="search">
  • b) <search> element
  • c) Both a and b
  • d) <input type="text" role="search">
Answer: A - The search input type provides built-in search functionality.

162. Which HTML5 feature allows creating a telephone number input field?

  • a) <input type="tel">
  • b) <phone> element
  • c) Both a and b
  • d) <input type="number">
Answer: A - The tel input type is specifically for telephone numbers.

163. Which HTML5 feature allows creating a URL input field?

  • a) <input type="url">
  • b) <url> element
  • c) Both a and b
  • d) <input type="text" pattern="https?://.+">
Answer: A - The url input type provides built-in URL validation.

164. Which HTML5 feature allows creating an email input field?

  • a) <input type="email">
  • b) <email> element
  • c) Both a and b
  • d) <input type="text" pattern="[^@]+@[^@]+\.[^@]+">
Answer: A - The email input type provides built-in email validation.

165. Which HTML5 feature allows creating a password input field?

  • a) <input type="password">
  • b) <password> element
  • c) Both a and b
  • d) <input type="text" autocomplete="current-password">
Answer: A - The password input type obscures input for security.

166. Which HTML5 feature allows creating a file upload input?

  • a) <input type="file">
  • b) <upload> element
  • c) Both a and b
  • d) Drag-and-Drop API
Answer: A - The file input type enables file selection.

167. Which HTML5 feature allows creating a hidden input field?

  • a) <input type="hidden">
  • b) <hidden> element
  • c) Both a and b
  • d) CSS display: none
Answer: A - The hidden input type stores data without UI visibility.

168. Which HTML5 feature allows creating a reset button?

  • a) <input type="reset">
  • b) <button type="reset">
  • c) Both a and b
  • d) JavaScript form.reset()
Answer: C - Both input and button elements support reset functionality.

169. Which HTML5 feature allows creating a submit button?

  • a) <input type="submit">
  • b) <button type="submit">
  • c) Both a and b
  • d) JavaScript form.submit()
Answer: C - Both input and button elements support submit actions.

170. Which HTML5 feature allows creating a button without default behavior?

  • a) <input type="button">
  • b) <button type="button">
  • c) Both a and b
  • d) <div onclick="...">
Answer: C - Both create buttons that require explicit JavaScript handlers.

171. Which HTML5 feature allows creating a checkbox?

  • a) <input type="checkbox">
  • b) <checkbox> element
  • c) Both a and b
  • d) role="checkbox" (ARIA)
Answer: A - The checkbox input type creates toggleable options.

172. Which HTML5 feature allows creating a radio button group?

  • a) <input type="radio" name="group">
  • b) <radiogroup> element
  • c) Both a and b
  • d) role="radiogroup" (ARIA)
Answer: A - Radio inputs with the same name attribute form a group.

173. Which HTML5 feature allows creating a textarea?

  • a) <textarea>
  • b) <input type="textarea">
  • c) Both a and b
  • d) contenteditable attribute
Answer: A - <textarea> is the dedicated element for multi-line text.

174. Which HTML5 feature allows creating a dropdown list?

  • a) <select>
  • b) <datalist>
  • c) Both a and b
  • d) <dropdown>
Answer: A - <select> creates a traditional dropdown list.

175. Which HTML5 feature allows creating an autocomplete dropdown?

  • a) <datalist>
  • b) <input list="...">
  • c) Both a and b
  • d) JavaScript autocomplete libraries
Answer: C - <datalist> paired with list attribute enables native autocomplete.

176. Which HTML5 feature allows creating a multi-select dropdown?

  • a) <select multiple>
  • b) <multiselect>
  • c) Both a and b
  • d) Checkbox group
Answer: A - The multiple attribute on <select> enables multi-selection.

177. Which HTML5 feature allows grouping dropdown options?

  • a) <optgroup>
  • b) <option group="...">
  • c) Both a and b
  • d) CSS styling
Answer: A - <optgroup> visually groups options under a label.

178. Which HTML5 feature allows creating a label for form controls?

  • a) <label>
  • b) aria-label
  • c) Both a and b
  • d) title attribute
Answer: A - The <label> element semantically associates text with a control.

179. Which HTML5 feature allows creating a fieldset for grouping form controls?

  • a) <fieldset>
  • b) <group>
  • c) Both a and b
  • d) CSS border
Answer: A - <fieldset> groups related form elements semantically.

180. Which HTML5 feature allows creating a legend for a fieldset?

  • a) <legend>
  • b) <fieldset title="...">
  • c) Both a and b
  • d) Heading element
Answer: A - <legend> provides a caption for <fieldset>.
« First 7 8 9 10 Last »
« Previous Page Next Page »

Learn Computer Skills with PCBooks

Master computer skills with PCBooks! Explore interactive tutorials, MCQ tests, and online exams for programming, web development, and IT fundamentals. Perfect for beginners and advanced learners.

Online MCQ Tests for Programming

Practice programming MCQ questions and improve your coding skills with our online quizzes. Whether you're learning Python, Java, or C programming, PCBooks has you covered.

Free Web Development Tutorials

Learn HTML, CSS, and JavaScript with our free web development tutorials. Test your knowledge with interactive quizzes and online exams.