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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *