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.
What is the default value of the animation-direction property in CSS?
- alternate
- forwards
- normal
- reverse
The default value of the animation-direction property in CSS is normal. When animation-direction is set to normal, the animation plays forward, and then it starts from the beginning when it reaches the end, creating a continuous loop.
Which CSS property is used to clear the effects of floating elements?
- border
- clear
- margin
- padding
The clear property in CSS is used to clear the effects of floating elements. It ensures that no element should touch the left or right-hand sides of a floating element and that it should appear below any preceding floating elements.
What is the correct syntax to use a custom property in your CSS?
- #property-name
- &property-name
- *property-name
- --property-name
To use a custom property (also known as a CSS variable), you should use the syntax --property-name. Custom properties allow you to define reusable values in your CSS and use them throughout your stylesheet. They are preceded by two hyphens and are referenced with the var() function, like var(--property-name).
The process by which styles are applied to an element based on their source and specificity is known as the ________.
- Cascade
- Declaration
- Inheritance
- Specificity
The process by which styles are applied to an element based on their source and specificity is known as the Cascade. Cascade refers to the process of determining which styles should be applied when there are conflicting style rules from different sources like user styles, author styles, and browser defaults.
The ________ filter in CSS is used to adjust the brightness of an element.
- blur
- brightness
- contrast
- sepia
The brightness filter in CSS is used to adjust the brightness of an element. It allows you to control how bright or dark an element appears, with values less than 1 making it darker, and values greater than 1 making it brighter.
Which property-value combination will make text both italicized and bold?
- font-bold: true; font-italic: true;
- font-type: bold-italic;
- font-weight: bold; font-style: italic;
- text-decoration: underline; font-style: italic;
To make text both italicized and bold, you should use the CSS properties font-weight: bold; to make it bold and font-style: italic; to make it italic. This combination creates text that is both thicker and slanted, resulting in bold and italicized text.
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.