The ::after pseudo-element in CSS is typically used to ________.

  • create inline comments in CSS
  • insert content after the selected element
  • select the first child element
  • style the element before the selected element
The ::after pseudo-element in CSS is used to insert content after the selected element. It is commonly used for adding decorative elements or additional content after an existing element. By using the ::after pseudo-element and specifying the content property, you can dynamically generate and place content after an element without modifying the HTML structure.

Which property allows you to control the size of tracks in a grid layout?

  • grid-row: auto;
  • grid-template-columns;
  • grid-template-rows;
  • grid-track: size;
The property that allows you to control the size of tracks (rows and columns) in a grid layout is 'grid-template-columns' for columns and 'grid-template-rows' for rows. These properties let you define the size of the grid tracks using various units like pixels, percentages, or 'fr' units.

What does the CSS property "font-display" control?

  • How much space a font file occupies on the server
  • How quickly a font is loaded and rendered on a web page
  • The color and style of text
  • The size of text
The "font-display" property in CSS controls how web fonts are displayed during loading. It's used to manage the flash of unstyled text (FOUT) or invisible text, making it an essential property for optimizing web font performance. Setting it to "swap" tells the browser to use a system font until the custom font is available, reducing FOUT.

How would you make an animation run indefinitely in CSS?

  • Set animation-iteration to infinite.
  • Set the animation-delay property to a very large value.
  • Use animation-loop property and set it to true.
  • Use the animation-duration property and set it to infinite.
To make an animation run indefinitely in CSS, you should use the animation-duration property and set it to infinite. This property specifies the time it takes for one cycle of the animation, and when set to infinite, it ensures that the animation continues to run indefinitely.

In the context of CSS masking, what does the mask-composite property do?

  • Combines a mask image with the element using the blend mode specified.
  • Defines the shape of the mask by specifying a path.
  • Determines the transparency of the mask image.
  • Specifies the position of the mask image relative to the masked element.
The mask-composite property in CSS is used to determine how a mask image should be combined with the element it's applied to. It's used to control the blending mode of the mask image with the element, allowing for various effects.

You're working on a responsive design where you want a row of items to wrap onto the next line when there isn't enough space. Which Flexbox properties would you adjust?

  • align-content and flex-basis
  • flex-direction and flex-wrap
  • justify-content and align-items
  • order and flex-grow
To make a row of items wrap onto the next line when there isn't enough space in a Flexbox layout, you would adjust the flex-direction property to "column" (for vertical stacking) and flex-wrap to "wrap." This allows the items to stack vertically when space is limited.

How can you pause an animation before it begins or between iterations?

  • animation-delay
  • animation-hold
  • animation-pause
  • animation-play-state
To pause an animation before it begins or between iterations, you should use the animation-play-state property. By setting it to paused, you can temporarily halt the animation. This is useful for creating interactive animations and controlling when they start or stop.

In terms of specificity, which type of selector has the highest priority?

  • Class selectors
  • Element selectors
  • ID selectors
  • Universal selectors
In terms of specificity, ID selectors have the highest priority. They are more specific than class selectors, element selectors, and universal selectors, and styles defined using ID selectors will override styles defined with lower-specificity selectors.

In CSS, when a variable is not set or its value is invalid, it will return the ________ value.

  • Default
  • Initial
  • Null
  • Undefined
In CSS, when a variable is not set or its value is invalid, it will return the default value. This default value varies depending on the property. For example, the default value for the font-size property is often 16 pixels.

Which CSS property is used to set the font family for an element?

  • font-family
  • font-size
  • font-style
  • font-weight
The font-family property in CSS is used to specify the font family for an element. This property allows you to define the typeface or font you want to use for text within that element, which can greatly affect the visual style of your website.