HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 32
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 allows you to add a drop shadow around an element?
A shadow: 5px 5px 10px rgba(0,0,0,0.5);
B box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
C text-shadow: 5px 5px 10px rgba(0,0,0,0.5);
D element-shadow: 5px 5px 10px rgba(0,0,0,0.5);
2. Which HTML tag allows you to place a video as the background of a page?
A <video>
with position: absolute;
B <background-video>
C <media>
D <embed>
3. How do you specify the main language of your HTML document?
A <html lang="fr">
B <html language="fr">
C <html lang="fr-FR">
D <document language="fr">
4. How do you create a link to another web page in a new window or tab?
A <a href="page.html" target="_blank">
B <link href="page.html" target="_blank">
C <a href="page.html" new-window>
D <a href="page.html" open-window="true">
5. Which CSS property allows you to define an infinite loop animation?
A animation-iteration-count: infinite;
B animation-loop: true;
C animation-restart: 0;
D infinite-loop: true;
6. Which CSS function allows you to create a smooth transition effect between two states of an element?
A transition-speed
B transition-timing-function
C transition-duration
D transition-effect
7. Which HTML tag allows you to specify a different format for printing?
A <media>
B <print>
C <link rel="stylesheet" media="print">
D <style media="print">
8. Which HTML tag is used to add content that can be modified by the user in a web page?
A <contenteditable>
B <editable>
C <textarea>
D <input type="text">
9. Which CSS selector allows you to target the first child of a parent?
A :first-child
B :nth-child(1)
C :child(1)
D :first-of-type
10. Which CSS property allows you to animate the opacity of an element smoothly?
A opacity-transition
B transition: opacity 0.5s;
C opacity: animate;
D fade-in: true;