CSS for Web Development

0% completed

Previous
Next
Quiz
Question 1
What is the main advantage of using relative units (e.g., em, rem) over absolute units (px)?
A
Relative units are simpler to use in all situations.
B
Relative units allow elements to scale according to the font size or viewport, making designs more flexible.
C
Relative units are faster to load than absolute units.
D
Relative units are only used for typography.
Question 2
Consider the following CSS rule. What does it do?
.container {
  width: 80vw;
}
A
Sets the container’s width to 80% of its parent element’s width.
B
Sets the container’s width to a fixed 80 pixels.
C
Sets the container’s width to 80% of the viewport’s width.
D
The container will fill the full width of the viewport.

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next