Web Quiz
1. Which CSS property is used to change the background color of an element?
A. color
B. font-color
C. background-color
D. bg-color
Submit
2. How do you apply a CSS style to an element with an ID?
A. #idname { ... }
B. .idname { ... }
C. idname { ... }
D. *idname { ... }
Submit
3. What does the CSS `flex` property do?
A. Aligns text to the center
B. Sets the width of an element
C. Defines how a flex container's children should be laid out
D. Adds margin to an element
Submit
4. How can you change the font size in CSS?
A. font-size: 16px;
B. text-size: 16px;
C. size: 16px;
D. font: 16px;
Submit
5. Which property is used to change the text color in CSS?
A. color
B. text-color
C. font-color
D. background-color
Submit
6. How do you select all `<p>` elements inside a `<div>` in CSS?
A. div p { ... }
B. div > p { ... }
C. p div { ... }
D. p { ... }
Submit
7. What is the default value of the `position` property in CSS?
A. static
B. relative
C. absolute
D. fixed
Submit
8. How can you add a comment in CSS?
A. /* This is a comment */
B. // This is a comment
C. <!-- This is a comment -- >
D. ** This is a comment **
Submit
9. What CSS property controls the text size?
A. font-size
B. text-size
C. text-height
D. font-style
Submit
10. How do you make a list horizontal in CSS?
A. display: inline;
B. display: block;
C. display: list;
D. display: flex;
Submit
Back To Home
Score