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 »

141. Which HTML5 feature allows detecting screen orientation changes?

  • a) screen.orientation
  • b) window.onorientationchange
  • c) Both a and b
  • d) DeviceOrientationEvent
Answer: C - Both methods detect orientation changes (modern and legacy).

142. Which HTML5 feature allows creating responsive images?

  • a) srcset attribute
  • b) <picture> element
  • c) Both a and b
  • d) CSS media queries
Answer: C - srcset and <picture> work together for responsive images.

143. Which HTML5 feature allows lazy loading of images?

  • a) loading="lazy"
  • b) Intersection Observer API
  • c) Both a and b
  • d) defer attribute
Answer: C - Native lazy loading (loading="lazy") and Intersection Observer both enable this.

144. Which HTML5 feature allows creating collapsible sections?

  • a) <details> and <summary>
  • b) CSS :target selector
  • c) Both a and b
  • d) <collapse> element
Answer: A - <details> creates native collapsible content.

145. Which HTML5 feature allows creating custom scrollbars?

  • a) ::-webkit-scrollbar
  • b) scrollbar-width (CSS)
  • c) Both a and b
  • d) <scrollbar> element
Answer: C - WebKit prefixes and CSS Scrollbars standardize styling.

146. Which HTML5 feature allows smooth scrolling?

  • a) scroll-behavior: smooth (CSS)
  • b) window.scrollTo({behavior: 'smooth'})
  • c) Both a and b
  • d) jQuery animations
Answer: C - CSS and JS methods provide smooth scrolling.

147. Which HTML5 feature allows creating modal dialogs?

  • a) <dialog> element
  • b) showModal() method
  • c) Both a and b
  • d) window.alert()
Answer: C - The <dialog> element and its showModal() method create native modals.

148. Which HTML5 feature allows creating toast notifications?

  • a) <notification> element
  • b) Notification API
  • c) Both a and b
  • d) alert()
Answer: B - The Notification API displays system-level toasts.

149. Which HTML5 feature allows creating tooltips?

  • a) title attribute
  • b) data-tooltip (custom)
  • c) Both a and b
  • d) <tooltip> element
Answer: C - Native title attribute or custom data-* implementations work.

150. Which HTML5 feature allows creating accordions?

  • a) <details> element
  • b) CSS + JavaScript
  • c) Both a and b
  • d) <accordion> element
Answer: C - <details> provides native functionality, or custom implementations.

151. Which HTML5 feature allows creating tabs?

  • a) role="tablist" (ARIA)
  • b) CSS + JavaScript
  • c) Both a and b
  • d) <tabs> element
Answer: C - ARIA roles enhance accessibility in custom tab implementations.

152. Which HTML5 feature allows creating carousels?

  • a) <carousel> element
  • b) CSS Scroll Snap
  • c) Both a and b
  • d) JavaScript libraries
Answer: B - CSS Scroll Snap enables native carousel-like behavior.

153. Which HTML5 feature allows creating dropdown menus?

  • a) <select> element
  • b) <datalist> element
  • c) Both a and b
  • d) <dropdown> element
Answer: C - <select> for traditional dropdowns, <datalist> for autocomplete.

154. Which HTML5 feature allows creating date pickers?

  • a) <input type="date">
  • b) <calendar> element
  • c) Both a and b
  • d) JavaScript libraries
Answer: A - Native date input type provides a built-in picker.

155. Which HTML5 feature allows creating color pickers?

  • a) <input type="color">
  • b) <color-picker> element
  • c) Both a and b
  • d) Canvas API
Answer: A - Native color input type provides a picker.

156. Which HTML5 feature allows creating range sliders?

  • a) <input type="range">
  • b) <slider> element
  • c) Both a and b
  • d) Drag-and-Drop API
Answer: A - Native range input type creates sliders.

157. Which HTML5 feature allows creating progress bars?

  • a) <progress> element
  • b) CSS animations
  • c) Both a and b
  • d) <progressbar> element
Answer: A - <progress> semantically represents task completion.

158. Which HTML5 feature allows creating spinners/loaders?

  • a) <spinner> element
  • b) CSS animations
  • c) Both a and b
  • d) SVG animations
Answer: B - CSS is the standard way to create loading animations.

159. Which HTML5 feature allows creating toggle switches?

  • a) <input type="checkbox"> + CSS
  • b) <toggle> element
  • c) Both a and b
  • d) role="switch" (ARIA)
Answer: A - Checkboxes styled with CSS create toggle switches.

160. Which HTML5 feature allows creating breadcrumb navigation?

  • a) <breadcrumb> element
  • b) <nav> + ARIA labels
  • c) Both a and b
  • d) Ordered lists
Answer: B - <nav> with ARIA roles semantically marks breadcrumbs.
« 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.