HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 18
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. In CSS, the property that determines the space between the edge of an element and its content is ______
A border
B padding
C margin
D content
2. Which CSS property is used to align text horizontally within a container?
A text-align
B vertical-align
C align-items
D justify-content
3. Which HTML entity is used to display the character “&” (ampersand)?
A &
B <
C >
D ©
4. Which CSS property is used to add a shadow to text?
A box-shadow
B text-shadow
C shadow
D text-effect
5. Which HTML tag is used to create a checkbox in a form?
A <input type="checkbox">
B <checkbox>
C <input type="radio">
D <select>
6. Which CSS property allows Flexbox items to automatically adjust to the available width?
A flex-wrap
B flex-shrink
C flex-grow
D flex-basis
7. What type of link is used to refer to a resource in the same folder as the web page?
A Absolute link
B Relative link
C Resource link
D Internal link
8. Which CSS property allows you to define the size of columns in a CSS grid?
A grid-template-columns
B grid-template-rows
C grid-column
D grid-gap
9. How do you write a comment in HTML?
A // This is a comment
B <!-- This is a comment -->
C /* This is a comment */
D <!--# This is a comment -->
10. Which HTML tag is used to include an external JavaScript file in a page?
A <script>
B <link>
C <style>
D <js>