CSS Units and Values Quiz
Want to learn more than this quiz offers you? Have a look at my Frontend web
development courses.
Create an account and save your quiz results
Login and save your results
OR
Question 1/15
In CSS, what unit would you use if you want a value to be proportional to the height of the viewport?
Select your answer
Question 2/15
What measurement is used to define distances regardless of screen resolution?
Select your answer
Question 3/15
What does the % unit in CSS represent?
Select your answer
Question 4/15
Which of these units adjusts based on screen size?
Select your answer
Question 5/15
If the root font size is 10px, what is 2rem?
Select your answer
Question 6/15
What CSS unit could be suitable to create a responsive text size that scales with viewport width?
Select your answer
Question 7/15
If 1in equals 96px, how many pixels are in 0.5in?
Select your answer
Question 8/15
How many pixels typically represent 1 inch in CSS?
Select your answer
Question 9/15
What does the unit 'px' stand for in CSS?
Select your answer
Question 10/15
How is a value of 50% interpreted in terms of length in CSS?
Select your answer
Question 11/15
What happens to a CSS 'rem' unit if the root font size is changed in a media query?
Select your answer
Question 12/15
Which CSS unit would you use for a strictly non-responsive layout?
Select your answer
Question 13/15
Which is a relative length unit based on the font size of the root element?
Select your answer
Question 14/15
Which unit in CSS is used to define the size relative to the viewport's width?
Select your answer
Question 15/15
What is 1em if the parent element's font size is 16px?
Select your answer
Your Results
You did not answer any questions correctly.
Your Answers
Question 1/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
In CSS, what unit would you use if you want a value to be proportional to the height of the viewport?
Available answers
'vh' is the unit used to define sizes relative to the viewport height.
Question 2/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What measurement is used to define distances regardless of screen resolution?
Available answers
'cm' is a real-world measurement and remains the same regardless of screen resolution, unlike 'px' which can vary.
Question 3/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What does the % unit in CSS represent?
Available answers
The % unit represents a percentage of the container's width or height, depending on the context.
Question 4/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which of these units adjusts based on screen size?
Available answers
'vw' adjusts dynamically according to the width of the screen, unlike absolute units such as cm or px.
Question 5/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
If the root font size is 10px, what is 2rem?
Available answers
2rem is double the root font size, resulting in 20px.
Question 6/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What CSS unit could be suitable to create a responsive text size that scales with viewport width?
Available answers
'vw' is often used to create responsive designs as it scales with the width of the viewport.
Question 7/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
If 1in equals 96px, how many pixels are in 0.5in?
Available answers
0.5 inches equals 48 pixels since 1 inch equals 96 pixels.
Question 8/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
How many pixels typically represent 1 inch in CSS?
Available answers
In CSS, 1 inch is conventionally equal to 96 pixels.
Question 9/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What does the unit 'px' stand for in CSS?
Available answers
In CSS, 'px' stands for pixels, which is a unit for measuring sizes.
Question 10/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
How is a value of 50% interpreted in terms of length in CSS?
Available answers
50% is interpreted as half of the element's containing block measurement.
Question 11/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What happens to a CSS 'rem' unit if the root font size is changed in a media query?
Available answers
'rem' units base their size on the root element's font size, so any changes to that in a media query will affect all 'rem' values globally.
Question 12/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which CSS unit would you use for a strictly non-responsive layout?
Available answers
'px' is used for non-responsive layouts as it is an absolute unit that doesn't scale with the viewport size.
Question 13/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which is a relative length unit based on the font size of the root element?
Available answers
The 'rem' unit is relative to the font size of the root element, enabling consistent sizing.
Question 14/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
Which unit in CSS is used to define the size relative to the viewport's width?
Available answers
The 'vw' unit in CSS is relative to 1% of the viewport's width.
Question 15/15
😊 Your
answer was correct
🙁 Your
answer was incorrect
What is 1em if the parent element's font size is 16px?
Available answers
1em equals the parent element's font size, which is 16px in this case.