Learn Accessibility by Building a Quiz - Step 34

To prevent unnecessary repetition, target the before pseudo-element of the p element, and give it a content property of "Question #" .
Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

p::before{
  content: attr(text);
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69

Challenge: Learn Accessibility by Building a Quiz - Step 34

Link to the challenge:

Hi,

This challenge requires the content of the before pseudo element to be “Question #”. You content is “attr(text)”.

1 Like

I got it also but what does this element actually do and what it is used for? ( ::before )

I know that there is also the ::after that creates an element that is the last child of the selected element

Hello, it is nice to see you back in the forum!

Here is a good article from FCC News that could help you understand this better.

As well, please do not use somebody else’s post for your questions?

You can create you own post using the </> at the top of this textarea box, or using the Help that appears in every step of lessons in Responsive Web Design.
This allows for a more focused, accurate response to your questions.

Happy coding!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.