How can you create a blur effect on an image using CSS?

  • background-color: blue;
  • border: 1px solid black;
  • filter: blur(5px);
  • opacity: 0.5;
To create a blur effect on an image using CSS, you can use the filter property with the blur function. For example, filter: blur(5px); would apply a blur effect to the image, where "5px" represents the level of blurriness. This can be adjusted to control the blur intensity.

Autoprefixing tools parse CSS and add or remove vendor prefixes based on data from ________.

  • Browser user agents
  • Developer preferences
  • JavaScript engines
  • The CSS Working Group
Autoprefixing tools, like Autoprefixer, analyze CSS and add or remove vendor prefixes to ensure compatibility across different browsers. They use data from browser user agents (e.g., Chrome, Firefox) to determine which prefixes are required for specific CSS properties.

When you want to generate multiple class or ID variations in SASS, you would typically use ________.

  • Functions
  • Nesting
  • Placeholder selectors
  • Variables
When you want to generate multiple class or ID variations in SASS, you would typically use placeholder selectors, also known as %placeholders. These selectors allow you to define styles that can be included in other selectors using the @extend directive, promoting reusability and ensuring cleaner CSS output.

What is the total width of an element (including padding and border) when the 'box-sizing' property is set to 'content-box'?

  • The total width includes padding and border.
  • The total width is calculated differently based on the 'box-sizing' property.
  • The total width is the content width plus margin.
  • The total width is the same as the content width.
When 'box-sizing' is set to 'content-box,' the total width of an element includes padding and border. The content width does not include these, but the total width does.

How does Autoprefixing aid in ensuring cross-browser compatibility?

  • Autoprefixing adds vendor-specific prefixes to CSS properties, ensuring compatibility with various browsers.
  • Autoprefixing automatically generates alternate versions of your styles for different browsers.
  • Autoprefixing replaces outdated CSS properties with modern equivalents.
  • It converts JavaScript code to CSS for browsers that do not support modern JavaScript.
Autoprefixing is the process of adding vendor-specific prefixes to CSS properties to ensure cross-browser compatibility. It automatically generates CSS rules with the necessary prefixes, like -webkit-, -moz-, or -ms-, making sure that your styles are correctly interpreted by different browsers. This helps avoid the need for writing separate CSS rules for each browser.

What is the result when an element does not have a specific style defined but its parent does?

  • The browser applies default styles to the element.
  • The element inherits styles from a global stylesheet.
  • The element inherits the styles from its parent.
  • The element remains unstyled.
When an element does not have a specific style defined but its parent does, it will inherit the styles from its parent. This inheritance is a fundamental concept in CSS and helps maintain consistency in the appearance of web pages.

You want to target all paragraphs that are immediately after an h2 element within the same container. Which CSS selector combination will you use?

  • h2 + p
  • h2 > p
  • h2 p
  • h2 ~ p
To target all paragraphs immediately after an h2 element within the same container, you would use the selector h2 + p. This selector selects any

element that is immediately preceded by an

element.

How can you ensure that text remains visible during webfont load?

  • Reduce the font file size
  • Set "font-display: swap;" in your CSS
  • Use "font-style: italic;" for fallback fonts
  • Use JavaScript to handle font loading
To ensure that text remains visible during web font loading, you can set the "font-display" property in your CSS to "swap." This tells the browser to use a fallback font until the web font is fully loaded and ready to display, preventing a "FOUT" (Flash of Unstyled Text) for web fonts.

What value of the display property makes an element behave like a block-level element but allows it to sit inline with other content?

  • block
  • inline
  • inline-block
  • none
The value of the display property that makes an element behave like a block-level element but allows it to sit inline with other content is inline-block. This is particularly useful when you want an element to have block-level properties (like the ability to set width and height) while still flowing inline with adjacent content.

You're developing a website where certain styles should only be applied to screens wider than 768px. How would you set this condition using media queries?

  • @media (min-width: 768px) { /* Styles go here */ }
  • @media (screen, min-width: 768px) { /* Styles go here */ }
  • @media screen (min-width: 768px) { /* Styles go here */ }
  • @media screen and (min-width: 768px) { /* Styles go here */ }
To create a media query for screens wider than 768px, you should use the @media rule, followed by the screen keyword (optional) and and (min-width: 768px). The correct option is @media screen and (min-width: 768px) { /* Styles go here */ }.