How does the "line-height" property affect the vertical spacing of a block of text?

  • It defines the space between two blocks of text
  • It determines the height of each line of text
  • It has no impact on the vertical spacing of text
  • It sets the space between characters within a line
The "line-height" property in CSS specifies the vertical space between lines of text within a block. A larger line-height value increases the vertical spacing, making text more readable, while a smaller value reduces the spacing. It is crucial for controlling text layout and readability.

In responsive design, what does the term "mobile-first" approach mean?

  • It means designing exclusively for tablets and excluding other device types.
  • It means designing only for mobile devices and ignoring desktop users.
  • It means designing primarily for desktop users and adapting the design for mobile devices later.
  • It means starting the design process with the mobile layout and progressively enhancing it for larger screens.
The "mobile-first" approach in responsive design involves starting the design process with a focus on mobile devices. This approach emphasizes designing for small screens first and then progressively enhancing the design for larger screens, such as tablets and desktops. It ensures that the design works well on mobile devices and then adapts gracefully to larger screens, providing a better user experience across different devices.

If you want list items to display horizontally rather than vertically, the CSS property to adjust is ________.

  • display: block;
  • display: inline;
  • float: left;
  • text-align: center;
To make list items display horizontally (side by side) instead of vertically (stacked), you should adjust the CSS property "float: left." This property is used to float elements next to each other.

How would you blend two overlapping elements using the mix-blend-mode property?

  • Adjust the opacity of one element to make it transparent, revealing the element beneath.
  • Apply the mix-blend-mode property to the parent container of the two elements.
  • Mix the colors of the overlapping elements based on the specified blend mode.
  • Use the 'blend' class in HTML to specify the blending mode.
The mix-blend-mode property in CSS is used to control how elements blend when they overlap. It's used to specify how the colors of elements should be mixed, based on a defined blending mode, to create various visual effects.

You need to remove the default bullet points and apply a custom image as the bullet for each list item in an unordered list. How would you achieve this in CSS?

  • Apply a background image to each list item.
  • Use the list-style-image property.
  • Use the list-style-type property with the image value.
  • Use the list-style: none; property.
To remove the default bullet points and apply a custom image as the bullet for list items in an unordered list, you should use the list-style-image property and specify the URL of the image you want to use as the bullet.

An element with float: right; will move to the ________ of its containing element.

  • Bottom
  • Left
  • Right
  • Top
An element with float: right; will move to the right of its containing element. This property is often used for creating layouts where elements are floated to the right or left, allowing text and other content to flow around them.

How can you create a function in SASS that returns a value?

  • Using the @function directive
  • Using the @mixin directive
  • Using the @return keyword
  • Using the @value keyword
To create a function in SASS that returns a value, you use the @function directive and the @return keyword within the function block. This allows you to define reusable pieces of logic that can compute and return values. Functions are typically used for calculations and value generation in SASS.

If you want an animation to run indefinitely, which value would you set for the animation-iteration-count property?

  • forever
  • infinite
  • loop
  • repeat
To make an animation run indefinitely, you should set the animation-iteration-count property to the value infinite. This ensures that the animation will keep running continuously without a specified end point.

The ______ value of the animation-timing-function property makes the animation progress in a series of jumps, like frames in a flipbook.

  • cubic-bezier
  • ease-in-out
  • linear
  • steps
The steps value of the animation-timing-function property divides the animation into a series of distinct intervals, creating a frame-by-frame animation effect, similar to a flipbook. You specify the number of steps, like steps(4), to control the number of frames.

You're working on a project where you need to apply the same set of styles to multiple elements but with slight variations. How can SASS/SCSS assist you in this scenario?

  • Create a new class for each element with the slight variations in an SCSS file.
  • Use SASS/SCSS variables and create a single class with conditional styles based on these variables.
  • Use inline styles in the HTML for each element.
  • Write separate CSS styles for each element in a standard CSS file.
SASS/SCSS allows you to use variables to define styles and apply them conditionally. In this scenario, you should use SASS/SCSS variables to define common styles and then create a single class with conditional styles based on these variables to apply the slight variations to multiple elements. This promotes code reusability and maintainability.