HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 16
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 changes the direction of items in a flex container?
A flex-direction
B align-items
C justify-content
D flex-wrap
2. Which HTML tag is used to define a section of content?
A <section>
B <div>
C <article>
D <header>
3. Which CSS pseudo-class targets an element when it is activated (e.g., a clicked button)?
A :hover
B :active
C :focus
D :visited
4. Which CSS property makes a flex item occupy all the available space in its container?
A flex-grow
B flex-shrink
C flex-basis
D flex
5. Which CSS property defines the order of items in a flex container?
A order
B flex-order
C flex-direction
D align-items
6. Which HTML tag is used to define an introductory section?
A <header>
B <article>
C <section>
D <nav>
7. Which CSS property defines spacing between items in a flex container?
A margin
B gap
C padding
D align-items
8. Which HTML attribute defines a password input field?
A type="text"
B type="password"
C type="secure"
D type="hidden"
9. Which HTML tag is used to create a hyperlink to another page?
A <button>
B <link>
C <a>
D <url>
10. Which HTML tag is used to add a submit button in a form?
A <submit>
B <button>
C <input type="submit">
D <input type="button">