Learn HTML Forms by Building a Registration Form - Step 16

Step 16 on Learn HTML forms by Building a Registration Form won’t work

Instructions are:
Specifying the type attribute of a form element is important for the browser to know what kind of data it should expect. If the type is not specified, the browser will default to text.

Give the first two input elements a type attribute of text, the third a type attribute of email, and the fourth a type attribute of password.

The email type only allows emails with a @ and a . in the domain. The password type obscures the input, and warns if the site does not use HTTPS.

I am being told that: " You should give the third input element a type attribute of email" …which I did.

Any ideas???

   **Your code so far**
/* file: index.html */
<!DOCTYPE html>
   <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 action='https://register-demo.freecodecamp.org'>
       <label type="text">Enter Your First Name: <input /></label>
       <label type="text">Enter Your Last Name: <input /></label>
       <label type="email">Enter Your Email: <input /></label>
       <label type="password">Create a New Password: <input /></label>
/* 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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

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

Link to the challenge:

Review in which element you placed your type attributes

I feel like these are the right spots. It spoke specifically about the email line in the error.

Enter Your First Name:
Enter Your Last Name:
Enter Your Email:
Create a New Password:

what type of inputs are those? you need to tell the system what type of information it expects in the textarea

Hi, unfortunately I am not able to share my own codes I have done, but I did how you suggested to do to chubchub, but still not working. Can you please send to me the solution please, the whole thing so I can compare it with mine. thanks for your help

I’m not sure what it is you need help with but i’ll give you a hint, there’s a type of attribute that all four needs to be assigned to in your input element

Thank you, It’s all done, but still not working. What I said I wish to send the whole thing to the group, so someone could help, but somehow there is no option anymore to share what I have

Copy the code you’re struggling with using three backtick ``` at the beginning of your code and at the end

hey dude, did you figure this out? I have the same exact problem. my code is alright, but it keep having “You should give third input element a “type” attribute of “email””

I looked at youtube video, even my code is exact same with the youtuber, but he passed while I’m not. I wonder if this is a bug.

nevermind, solve it.


sometimes its just spacing

I don’t know if you have figured this out or not but to fix this you need to move your type attributes from after the label element to after the input element.
Enter Your First Name:
remember to include the space after the colon.

1 Like

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