Learn HTML Forms by Building a Registration Form - Step 17

Tell us what’s happening:
Describe your issue in detail here.
The app/site gives me an error everytime.
It says it needs a label element. I nested “input” inside the first label.
What am I doing wrong?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form method="post" action='https://register-demo.freecodecamp.org'>

<!-- User Editable Region -->

        <labe input="">Enter Your First Name:</label>
        <label input="">Enter Your Last Name:</label>
        <label input="">Enter Your Email:</label>
        <label input="">Create a New Password:</label>

<!-- User Editable Region -->

/* file: styles.css */
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;

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

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36

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

Link to the challenge:

1 Like

First, you got typo on your label element
Second, input is an element. What are you doing right now is making it as a class so it will not work.

This example below is called nesting.

1 Like

Hello! :slightly_smiling_face:
I think there was some misunderstanding in the instructions. The input element should be behind the actual text, not within the opening label element . As mentioned by hartatociptajaya, the first label is missing a letter in it.
Hope this helps you.

1 Like

Thank you very much I’ll be looking into it.

1 Like

This help post did very well in assisting me, I thought from the instructions that the “input” element was to be placed within the labels… thank you!

1 Like

You are welcome. Happy coding! :slight_smile:

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