HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 14
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. What is the role of media queries in CSS?
A They are used to create CSS animations.
B They allow applying CSS styles based on screen size or device.
C They are used to change background colors.
D They are used to create dropdown menus.
2. What is the hexadecimal value for the color red?
A #FF0000
B #FF0100
C #F00000
D #F00001
3. What is the hexadecimal value for the color blue?
A #FF0000
B #0000FF
C #F00000
D #F00001
4. Which CSS property is used to create a linear gradient?
A gradient-background
B linear-gradient
C background-gradient
D color-gradient
5. Which HTML tag is used to embed a video file?
A <audio>
B <video>
C <embed>
D <source>
6. Which CSS property controls the display type of an element?
A position
B display
C visibility
D float
7. Which CSS property is used to change the font of text?
A font-family
B text-font
C font-style
D font-weight
8. Which CSS property is used to define a transition to animate style changes?
A animation
B transition
C move
D transform
9. Which HTML entity is used to display the infinity symbol (∞)?
A ∞
B &infinite;
C &symbol;
D &inf;
10. Which HTML tag is used to define a column header in a table?
A <td>
B <th>
C <tr>
D <thead>