HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 31
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 HTML tag is used to define an interactive area in a document where the user can draw or interact graphically?
A <canvas>
B <graphics>
C <interactive>
D <svg>
2. How can you customize the appearance of bullets in an HTML list?
A By modifying the text with list-style-type
B By using the list-style-image
property
C With list-item-design
D By using <custom-bullet>
3. Which HTML tag is used to associate an error message with a form field?
A <error>
B <message>
with an id
C <span>
D <label>
with a for
4. How can you merge cells horizontally in an HTML table?
A With the colspan
attribute
B By using rowspan
C With the merge
attribute
D By manually adjusting the cell sizes
5. Which CSS property is used to underline the text of an element?
A text-decoration: underline;
B border-bottom: 1px solid;
C text-align: underline;
D line-height: underline;
6. Which CSS property is used to change the direction of elements in a Flexbox container from horizontal to vertical?
A flex-direction: column;
B flex-direction: row-reverse;
C flex-wrap: reverse;
D justify-content: column;
7. Which CSS pseudo-class is used to target the first letter of a text element?
A ::start
B ::first-letter
C ::first-character
D ::beginning
8. Which CSS property allows you to rotate an element in 3D space?
A transform: rotateX();
B transform: rotate3d();
C transform: rotateY();
D transform: perspective();
9. Which CSS property is used to define a custom variable in your stylesheet?
A --variable-name
B var()
C variable-name
D @variable
10. Which HTML tag is used to create a hyperlink to an anchor located elsewhere on the same page?
A <link>
B <a href="#anchor">
C <button href="#anchor">
D <anchor>