HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 24
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 create a reset button in a form?
A <button type="reset">
B <input type="reset">
C <button reset>
D <input reset>
2. If a parent element has an opacity of 0.5, what effect will it have on its child elements?
A The opacity of the children remains unchanged.
B The children will also appear transparent with 0.5 opacity.
C The children will be completely opaque.
D The children will become invisible.
3. Which attribute is used to link an external CSS file in an HTML document?
A link
B href
C style
D css
4. What does the CSS property position: relative;
do?
A Positions the element relative to its parent.
B Positions the element relative to the screen.
C Allows moving an element from its normal position based on offset values.
D Positions the element based on the page content.
5. Which CSS property is used to apply an animation to an element?
A animate
B animation-name
C motion
D transition
6. Which CSS selector targets all <p> elements inside a <div>?
A div p
B div + p
C div > p
D p div
7. Which HTML attribute is used to submit a form?
A action
B method
C submit
D send
8. Which HTML tag is used to group the header of a table?
A <thead>
B <tbody>
C <tfoot>
D <tr>
9. Which CSS property sets a delay before an animation starts?
A animation-duration
B animation-delay
C transition-duration
D animation-timing
10. Which CSS selector targets an element that is the first child of its parent?
A parent:first-child
B element:first-child
C first-child
D parent > first-child