You need to style a button differently when it's disabled. Which CSS pseudo-class would be most appropriate to achieve this?

  • :disabled
  • :hidden
  • :inactive
  • :unavailable
To style a button differently when it's disabled, you should use the :disabled pseudo-class. This pseudo-class is specifically designed to target elements that are in a disabled state, such as disabled buttons or form fields. It allows you to apply distinct styles to these elements when they are disabled. The other options, :inactive, :unavailable, and :hidden, do not target disabled elements and are not suitable for this purpose.

You want to overlay a button on top of an image. The button should be at the bottom right corner of the image. How would you position the button using CSS?

  • Position it absolutely and use "bottom: 0; right: 0;"
  • Position it absolutely and use "top: 0; left: 0;"
  • Position it relatively and use "bottom: 0; right: 0;"
  • Position it relatively and use "top: 0; left: 0;"
To overlay a button on the bottom right corner of an image, you should position it absolutely and use "bottom: 0; right: 0;" to place it at the specified location relative to its nearest positioned ancestor or the viewport.

Which CSS property specifies whether an animation should play in reverse on alternate cycles?

  • animation-alternate
  • animation-direction
  • animation-play-state
  • animation-reverse
The animation-direction property in CSS is used to specify whether an animation should play in reverse on alternate cycles. When set to alternate, the animation runs forwards, then in reverse, and so on, creating a back-and-forth animation effect. This property is valuable for creating visually interesting and dynamic animations.

Which property in CSS is used to set the width of the content area of an element?

  • Border
  • Margin
  • Padding
  • Width
In CSS, the 'width' property is used to set the width of the content area of an element. It controls the width of the element's content, excluding padding, border, and margin.

To use a custom property in your styles, you reference it with the ________ syntax.

  • # symbol
  • $ symbol
  • & symbol
  • @ symbol
To use a custom property in your styles in CSS, you reference it with the @ symbol. Custom properties, also known as CSS variables, are defined using the :root pseudo-class, and their values can be accessed and used in your styles by prefixing the custom property name with the @ symbol.

How does the inherit value in CSS function?

  • It applies a default value to the element.
  • It has no effect on the element's styling.
  • It makes the element inherit the computed value of the property from its parent element.
  • It prevents inheritance from the parent element.
The inherit value in CSS makes the element inherit the computed value of the property from its parent element. It ensures that the property's value is taken from the parent element, allowing for consistent styling throughout the document.

The CSS @keyframes rule lets you create ________ over a set duration.

  • animations
  • transforms
  • transitions
  • variables
The @keyframes rule in CSS is used to create animations over a set duration. You define specific animation steps within the @keyframes rule, and then you can apply this animation to elements using the animation property. It allows you to control how an element changes over time.

If you want to blend the background images of an element, which property would you use?

  • background-blend-mode
  • background-image-blend-mode
  • background-mix-blend-mode
  • image-blend
To blend the background images of an element in CSS, you should use the background-blend-mode property. This property allows you to control how the background images blend with each other and with the element's background color. It offers various blending modes to achieve different visual effects.

Which combinator in CSS is used to select elements that are siblings and share the same parent?

  • ! (Siblings selector)
  • + (Adjacent sibling combinator)
  • > (Child combinator)
  • ~ (General sibling combinator)
The "~" (tilde) combinator in CSS is used to select elements that are siblings and share the same parent. It selects all siblings that match the specified selector.

What is the main advantage of using a modular CSS approach?

  • It allows for inlining all styles, reducing HTTP requests.
  • It enforces the use of global styles for a consistent look and feel.
  • It prioritizes complex selector chaining for fine-grained control.
  • It simplifies CSS development by encouraging a component-based structure and reusable code.
The main advantage of using a modular CSS approach is that it simplifies CSS development by encouraging a component-based structure and the creation of reusable code. This approach makes it easier to manage and maintain styles, improves code reusability, and reduces the chances of CSS conflicts and errors.