Why this test can't pass?

Tell us what’s happening:
this is the task: " Change the value of the font-size property for the paragraph to 16px to make it more visible."
when I made the font to 16px the test was not accepted

  **Your code so far**

<style>
p {
  font-size: 16px;
}
</style>
<p >Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
  **Your browser information:**

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

Challenge: Set the font-size of Paragraph Text

Link to the challenge:

1 Like

Welcome to the forums! Make sure to keep all styling within the <style> tags.

You already correctly targeted <p> elements, and then you attempted to do it again with your actual <p> element.

please look at it again i understand what you said but the test didn’t pass.

I copied your code into the editor and it passed the tests. Although be careful with spacing <p >

OK, I copied the code that was not pass here, can you have a look again?

the code…

<style>

  p {

    font-size: 16px;

  }

</style>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>

the test…
/ running tests Your p tag should have a font-size of 16 pixels.
// tests completed

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

Or you can try another browser

2 Likes

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

3 Likes

As @jwilkins.oboe stated. The code works fine on my end. Try incognito mode and see if it’s a browser extension messing you up.