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.

What does the 'box-sizing' property with a value of 'border-box' do?

  • It adds extra space to the content box.
  • It applies a shadow border around the element.
  • It changes the background color to black.
  • It makes the element's content box include padding and border.
The 'box-sizing' property with a value of 'border-box' makes the element's content box include the padding and border, ensuring that the specified width or height of the element includes everything within it, making layout and sizing more predictable and intuitive.

Which CSS property is used to change the text case, such as making text all uppercase?

  • font-style
  • letter-spacing
  • text-case
  • text-transform
The CSS property used to change the text case, such as making text all uppercase, is text-transform. It allows you to control the capitalization of text, including options like uppercase, lowercase, and capitalize. This is especially useful for headings and other text elements where you want to change the case style.

What is the purpose of the @keyframes rule in CSS?

  • It defines the base font size for an HTML document.
  • It defines the color scheme for a web page.
  • It sets the background image of an HTML element.
  • It specifies the keyframes for CSS animations.
The @keyframes rule in CSS is used to specify the keyframes for CSS animations. Keyframes describe how an animation progresses from the starting state to the ending state. They define the intermediate steps or percentage-based changes in the animation's properties, allowing for smooth and controlled animations.

What unit is typically recommended for setting the "line-height" property to ensure consistent spacing?

  • em
  • px
  • rem
  • vh
For setting the "line-height" property to ensure consistent spacing, the recommended unit is typically "em." Using "em" units allows the line height to be relative to the font size, which ensures that the spacing remains consistent even if the text size changes. This is especially useful for creating responsive and accessible web designs.