You're trying to style the first line of a paragraph to be bold. Which CSS pseudo-element will achieve this?
- ::before
- ::first-child
- ::first-letter
- ::first-line
To style the first line of a paragraph to be bold, you should use the ::first-line pseudo-element. This allows you to target and style the first line of text within an element. ::before and ::first-letter are used for different purposes, and ::first-child targets the first child element, not the first line of text.
Loading...
Related Quiz
- What is the primary purpose of the grid-template-areas property?
- How does the "line-height" property affect the vertical spacing of a block of text?
- What does the flex-direction property control in a flex container?
- 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?
- Which value of animation-fill-mode ensures the animation's styles are applied before the animation begins?