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 »

181. Which HTML5 feature allows creating a form without server submission?

  • a) <form onsubmit="return false">
  • b) <form novalidate>
  • c) Both a and b
  • d) <form method="none">
Answer: A - Returning false in onsubmit prevents submission.

182. Which HTML5 feature allows disabling form validation?

  • a) <form novalidate>
  • b) <input formnovalidate>
  • c) Both a and b
  • d) <form validate="false">
Answer: C - novalidate (form-wide) and formnovalidate (per-input) disable validation.

183. Which HTML5 feature allows custom validation messages?

  • a) setCustomValidity()
  • b) validationMessage property
  • c) Both a and b
  • d) title attribute
Answer: A - setCustomValidity() overrides default validation messages.

184. Which HTML5 feature allows checking form validity programmatically?

  • a) checkValidity()
  • b) reportValidity()
  • c) Both a and b
  • d) validate()
Answer: C - checkValidity() returns boolean, reportValidity() shows UI feedback.

185. Which HTML5 feature allows form autocomplete?

  • a) autocomplete attribute
  • b) <datalist>
  • c) Both a and b
  • d) localStorage
Answer: A - The autocomplete attribute controls browser autofill behavior.

186. Which HTML5 feature allows form submission via AJAX?

  • a) Fetch API
  • b) XMLHttpRequest
  • c) Both a and b
  • d) <form ajax>
Answer: C - Both Fetch and XHR enable AJAX form submission.

187. Which HTML5 feature allows file uploads with progress tracking?

  • a) File API + XHR/Fetch
  • b) <input type="file" progress>
  • c) Both a and b
  • d) WebSocket
Answer: A - File API with XHR/Fetch enables progress events.

188. Which HTML5 feature allows drag-and-drop file uploads?

  • a) Drag-and-Drop API
  • b) <input type="file" dropzone>
  • c) Both a and b
  • d) Clipboard API
Answer: A - The Drag-and-Drop API works with file inputs for uploads.

189. Which HTML5 feature allows form data serialization?

  • a) FormData API
  • b) URLSearchParams
  • c) Both a and b
  • d) JSON.stringify
Answer: C - FormData for multipart, URLSearchParams for URL-encoded.

190. Which HTML5 feature allows form reset programmatically?

  • a) form.reset()
  • b) <input type="reset">
  • c) Both a and b
  • d) location.reload()
Answer: C - Both JS method and reset button clear form values.

191. Which HTML5 feature allows form submission to a new window?

  • a) <form target="_blank">
  • b) window.open() + form.submit()
  • c) Both a and b
  • d) <form newwindow>
Answer: A - The target="_blank" attribute opens submissions in a new window.

192. Which HTML5 feature allows form submission to an iframe?

  • a) <form target="iframe-name">
  • b) <iframe name="...">
  • c) Both a and b
  • d) postMessage API
Answer: C - Target a named iframe for seamless form responses.

193. Which HTML5 feature allows form data preview before submission?

  • a) FormData + JavaScript
  • b) <output> element
  • c) Both a and b
  • d) <preview> element
Answer: C - FormData captures values, <output> displays results.

194. Which HTML5 feature allows form data persistence?

  • a) localStorage
  • b) sessionStorage
  • c) Both a and b
  • d) Cookies
Answer: C - Web Storage APIs persist form data client-side.

195. Which HTML5 feature allows form data encryption?

  • a) HTTPS
  • b) <form encrypt>
  • c) Both a and b
  • d) Web Crypto API
Answer: A - HTTPS encrypts data during submission (not HTML5-specific).

196. Which HTML5 feature allows form data compression?

  • a) gzip (server-side)
  • b) <form compress>
  • c) Both a and b
  • d) Brotli
Answer: A - Compression is handled server-side via HTTP headers.

197. Which HTML5 feature allows form data caching?

  • a) Service Workers
  • b) localStorage
  • c) Both a and b
  • d) <form cache>
Answer: C - Service Workers intercept submissions, localStorage stores data.

198. Which HTML5 feature allows form data synchronization?

  • a) IndexedDB
  • b) WebSocket
  • c) Both a and b
  • d) <form sync>
Answer: B - WebSockets enable real-time sync with servers.

199. Which HTML5 feature allows form data validation before submission?

  • a) Constraint Validation API
  • b) JavaScript validation
  • c) Both a and b
  • d) <form validate>
Answer: C - Native validation (HTML5) and custom JS can be combined.

200. Which HTML5 feature allows form submission without page reload?

  • a) Fetch API
  • b) XMLHttpRequest
  • c) Both a and b
  • d) <form reload="false">
Answer: C - Both Fetch and XHR enable seamless AJAX submissions.
« 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.