Help with Building a Registration Form - Step 16

Hey everyone! I’ve scoured all the other questions on this topic and haven’t found a solution yet. My issue is in CSS on the last few lines of my code when I’m being told to use a label selector to set the display as block and the margin as rem0.5 0.

I’m not sure what I’m doing wrong as it’s not a class (but I tried adding the period before label) and I made sure i separated the values by semicolons. The hint I get is " You should use the label selector. "

If anyone can see what I’m missing please let me know! Thanks in advance :smile:

***EDIT: It looks like I accidentally deleted the } at the end of the ‘body’ selector. I added it back in and the code passed. Don’t you love it when you answer your own questions?
Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form method="post" action='https://register-demo.freecodecamp.org'>
      <fieldset>
        <label>Enter Your First Name:</label>
        <label>Enter Your Last Name:</label>
        <label>Enter Your Email:</label>
        <label>Create a New Password:</label>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>
/* file: styles.css */
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;

/* User Editable Region */

label {
  display: block;
  margin: 0.5rem 0
}

/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Learn HTML Forms by Building a Registration Form - Step 16

Link to the challenge:

You accidentally removed the closing curly brace from the body ruleset above.

If you think you are doing everything correctly (which you are) then that might mean there is an error somewhere else (such as accidentally changing something). Sometimes the best solution is to restart the step to get the original code back and then try again.

1 Like

You answered so fast, thanks! After I posted the query I went back and noticed the } had gotten deleted too and added it back. I appreciate the help, I will definitely start from the beginning next time.

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