Even though I used p:nth-child(1){color: white;}
in my CSS style tag, it did not produce the expected result.
body {
background-color: #162b85;
}
button,
p:nth-child(1) {
color: white;
}
<p class="center">Register your account</p>
<div class="container">
<button type="submit" class="color">Sign up</button>
<p class="center">Already have an account? <a href="#">Sign
in</a>.</p>
</div>
I noticed that the first p tag in the HTML code remained black instead of turning white as I expected. It made me wonder if the br tag was causing this issue. After removing the br tag from the body element, the color of the p tag changed to white as desired.