HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 35
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 CSS property gives a 3D perspective to an element?
A perspective
B transform-style
C transform-perspective
D 3d-perspective
2. Which HTML tag allows you to embed a JavaScript file into a page and run animations?
A <script src="animation.js"></script>
B <js src="animation.js">
C <script type="text/javascript">
D <animate src="animation.js"></animate>
3. How do you create a radial gradient from blue to transparent in CSS?
A background: radial-gradient(blue, transparent);
B background: radial-gradient(transparent, blue);
C background-image: radial-gradient(blue, rgba(0,0,0,0));
D background: radial-gradient(blue to transparent);
4. Which CSS property makes an element circular with borders?
A circle-radius: 50%;
B border: circle;
C shape: circle;
D border-radius: 50%;
5. Which Flexbox property equally distributes remaining space between container elements?
A justify-content: space-evenly;
B justify-content: space-between;
C justify-items: space-evenly;
D align-items: center;
6. Which HTML tag is used to group form elements into a logical section?
A <group>
B <fieldset>
C <form-section>
D <block>
7. Which HTML tag is used to embed a Google map on a page?
A <iframe src="https://www.google.com/maps/embed?..."></iframe>
B <google-map src="..."></google-map>
C <map src="https://maps.google.com">
D <embed src="https://maps.google.com">
8. Which CSS effect creates a parallax scroll, where the background moves at a different speed than the content?
A background-attachment: fixed;
B background-position: scroll;
C transform: translateZ(1px);
D background-repeat: no-repeat;
9. Which HTML tag allows you to create a custom numbered list using images instead of numbers?
A <ol style="list-style-image: url('image.png');">
B <ul style="list-style-image: url('image.png');">
C <ol type="image">
D <ol style="counter-style: image('image.png');">
10. Which CSS property allows you to continuously animate a 360-degree rotation?
A transform: rotate(360deg);
B @keyframes rotate { transform: rotate(360deg); }
C
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
D @rotate { animation: 360deg infinite; }