CSS Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 23% Most missed: “When using position: fixed, what will the element always be positioned relative …”

CSS MCQs For LinkedIn Skill Assessments.

CSS Quiz
Time left 00:00
25 Questions

1. Which CSS will cause your links to have a solid blue background that changes to semitransparent on hover?
2. What is the difference between the following line-height settings?
css
line-height: 20px;
line-height: 2;
3. Which CSS properties can you use to create a rounded corner on just the top-left and top-right corners of an element?
css
A. border-radius: 10px 10px 0 0;
B. border-top-left-radius: 10px; and border-top-right-radius: 10px;
C. border-radius: 10px 0;
D. border-top-radius: 10px;
4. How do you add Google fonts to your project?
5. There are two sibling combinators that can be used to select elements contained within the same parent element; the general sibling combinator (~) and the adjacent sibling combinator (+). Referring to example below, which elements will the styles be applied to?
css
h2 ~ p {
color: blue;
}
h2 + p {
background: beige;
}

html

paragraph 1


Heading


paragraph 2


paragraph 3



6. What is not a valid way of declaring a padding value of 10 pixels on the top and bottom, and 0 pixels on the left and right?
7. When elements within a container overlap, the z-index property can be used to indicate how those items are stacked on top of each other. Which set of statements is true?
8. Which style places an element at a fixed location within its container?
9. While HTML controls document structure, CSS controls '___'.
10. What is an advantage of using inline CSS?
11. Review the HTML example below. Then choose the list of selectors that select the \

, from lowest to highest specificity.
html


...



12. Which W3C status code represents a CSS specification that is fully implemented by modern browsers?
13. When using the Flexbox method, what property and value is used to display flex items in a column?
14. Which CSS keyword can you use to override standard source order and specificity rules?
15. Given this code, which CSS declaration of .overlay will span the entire width and height of its container?
css


16. What is the rem unit based on?
17. Which items are valid values for the font-size property?
css
A. font-size: xsmall
B. font-size: 50%
C. font-size: 1em
D. font-size: 20px
18. The calc() CSS function is often used for calculating relative values. In the example below, what is the specified margin-left value?
css
.example {
margin-left: calc(5% + 5px);
}
19. CSS grid introduced a new length unit, fr, to create flexible grid tracks. Referring to the code sample below, what will the widths of the three columns be?
css
.grid {
display: grid;
width: 500px;
grid-template-columns: 50px 1fr 2fr;
}
20. The flex-direction property is used to specify the direction that flex items are displayed. What are the values used to specify the direction of the items in the following examples?
21. What is the correct order for listing different link states in a website so those states display correctly on the page?
22. Pseudo-classes are used to '_'.
23. What is the difference between the margin and padding properties?
24. When adding transparency styles, what is the difference between using the opacity property versus the background property with an 'rgba()' value?
25. What are three valid ways of adding CSS to an HTML page?

⚡ Recently practiced quizzes in this topic
Live quiz activity