Which of the following CSS combinators targets a direct child element?
- *
- +
- >
- ~
The ">" combinator is used to target a direct child element, ensuring that styles are applied only to the immediate child and not to nested descendants.
The ______ property in CSS lets you apply a delay before an animation starts.
- animation-delay
- animation-pause-delay
- animation-start-delay
- transition-delay
The property in CSS that allows you to apply a delay before an animation starts is the animation-delay. This property is used to create a pause before the animation begins, which is especially useful for sequencing animations.
You are tasked with ensuring that all hyperlinks have no underlines but should be underlined when hovered over. How would you implement this using CSS?
- a { text-decoration: none; } a:hover { text-decoration: underline; }
- a { text-decoration: underline; }
- a { text-decoration: underline; } a:hover { text-decoration: none; }
- a:hover { text-decoration: underline; }
To ensure that hyperlinks have no underlines by default but are underlined when hovered over, you should use the CSS rule a { text-decoration: none; } to remove the underlines from all anchor elements and then use a:hover { text-decoration: underline; } to specify that underlines should appear when the link is hovered.
OOCSS primarily focuses on separating container and content, and promoting the reuse of ________.
- CSS rules
- HTML elements
- JavaScript functions
- Styles
Object-Oriented CSS (OOCSS) emphasizes separating the container and content in your styles and promoting the reuse of styles (i.e., CSS rules). This approach helps keep your CSS modular, making it easier to maintain and reducing redundancy in your code.