HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 19
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 type of HTML input is used to enter a password?
A <input type="password">
B <input type="text">
C <input type="email">
D <input type="hidden">
2. Which HTML property is used to make a form field required?
A checked
B mandatory
C valid
D required
3. Which HTML tag is used to create a dropdown menu for selection?
A <select>
B <input>
C <dropdown>
D <option>
4. Which CSS selector is used to target all the elements of a page?
A *
B all
C every
D body
5. Which HTML tag is used to create a radio button in a form?
A <input type="radio">
B <button type="radio">
C <input type="checkbox">
D <radio>
6. Which CSS property allows positioning an element relative to its parent element with position: relative;
?
A position: fixed;
B position: absolute;
C position: relative;
D position: sticky;
7. Which HTML entity is used to display the character ” < "?
A <
B >
C ©
D &
8. How do you target all elements with the class “box” in CSS?
A class="box"
B #box
C box
D .box
9. Which HTML tag is used to enter a date in a form?
A <input type="date">
B <input type="datetime">
C <input type="time">
D <input type="calendar">
10. Which Flexbox property aligns elements at the bottom of the container?
A justify-content: flex-end;
B align-items: flex-end;
C align-self: flex-end;
D justify-items: flex-end;