HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 34
Multiple choice questions and answers (MCQs) on HTML/CSS to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as tags, web standards, CSS selector, objects, and more. This quiz will easily prepare anyone to pass their online test.
1. Which method allows you to load a JavaScript file asynchronously without blocking the page rendering?
A async
B defer
C onload
D lazyload
2. Which CSS property allows you to zoom an element when hovered?
A transform: scale()
B zoom: 1.5;
C hover: zoom-in;
D transform: enlarge()
3. Which CSS property allows you to make an image responsive and fit its container size?
A max-width: 100%;
B width: auto;
C img-responsive: true;
D flex-size: 100%;
4. Which HTML tag creates a form field for entering a decimal number with automatic validation?
A <input type="decimal">
B <input type="number" step="any">
C <input type="float">
D <input type="range" step="0.01">
5. Which CSS property allows you to apply styles only on small screens (mobile-first)?
A @media screen and (max-width: 1000px)
B @media (min-width: 600px)
C @media (max-width: 600px)
D @media screen and (min-width: 100px)
6. Which HTML syntax is used to create a link that directly calls a phone number from a mobile device?
A <a href="tel:1234567890">Call</a>
B <a href="call:1234567890">Call</a>
C <a href="phone:1234567890">Call</a>
D <a href="tel:+1234567890">Call Us</a>
7. Which HTML tag is used to structure text as a long quotation?
A <quote>
B <q>
C <cite>
D <blockquote>
8. Which CSS property creates a 3-column grid?
A grid-columns: 3;
B grid-template-columns: 1fr 1fr 1fr;
C grid-layout: 3 columns;
D grid-template-columns: 33% 33% 33%;
9. Which HTML tag allows you to add an audio file with controls (play, pause, volume) to the page?
A <audio controls>
B <media controls>
C <sound controls>
D <music controls>
10. Which HTML tag allows you to add a placeholder text in a text input field?
A placeholder
B label
C hint
D prompt