Need Help For Survey Form getting error for #10,#11 and for html validation error for name input,but i have placed it

https://codepen.io/Nishigandha_dhole/pen/YzGpwNV

1 Like

Hi @nisha.dhole28. Welcome to FCC.
You didn’t follow some of the instructions.

  1. You are supposed to use label elements instead of p elements like:
 <label for="name">Name<label/>
 <input type="text" id='name' class="form-control" name="name" placeholder="Enter your name"   required><br>

In fact if you replace your first p and input element in the form with the above, you will eliminate the first error.

  1. Your first input element should have an id of name.

Hi @nisha.dhole28!

Welcome to the forum!

I agree with @nibble.

I think you used p tags probably because it was easier to get everything on a seperate line since p tags are block level elements.

But if you just set the labels to display:block; then you can achieve the same results. Also avoid br tags. Use CSS instead.

yes I did the changes and its working now .thank you for your help.