First:<link> tag must be inside <head>...</head> element;
Second: Where is the <body>...</body> element?
Third: You only use two <p> elements. The first <p> has attribute id of value "description". You can use it in your CSS code like this:
#description {
text-align: left;
}
p {
text-align: center;
}
So you will have one style for the first <p> and a second style for the second <p>.
Fourth: The <input> element has no closing tag.
<input id="name" type="text" placeholder="Enter your name" required>
Fifth: As far as I know either you use the <input> element nested within the <label> element or you put the “for” attribute as the same value as the “id” of the <label> you want to reference. This way:
<label id="name-label">Name
<input id="name" type="text" placeholder="Enter your name" required>
</label>
OR
<label id="name-label" for="name">Name</label>
<input id="name" type="text" placeholder="Enter your name" required>
The “for” attribute of <label> must have the same value as the “id” attribute of <input>.
Sixth: The <option> tag can be used without any attributes, but you usually need the “value” attribute, which indicates what is sent to the server on form submission.
Seventh: You forgot the closing tag </form> .
I’ve noticed these problems.
In case you didn’t understand my explanation, English is not my native language. I used google translator to write you.
I hope I could help you and have a good study.
@gustavo.afc , thank you so much for your observations. i have taken my time to see those problems but please i would highly appreciate it if take a look at it the second time. am sorry for the inconveniences.
Hello again @blessedonyi ! I’m glad to help. No need to apologize this doubt is helping me to learn more. I would like to suggest that you use some source code editor software. It will help a lot in the error visualization. I use Visual Studio Code.
I’ll list some problems I found: First: The exclamation point is missing from DOCTYPE.
Second: The type="text/css" attribute inside the <link> tag is missing.
Third: The input element has no closing tag, you can remove all the </input> you put in your code. In the freeCodeCamp lessons the syntax adopted is this <input attribute="" />, but I discovered on the internet that you can write it another way as <input attribute="">. Both ways are correct.
Fourth: In this code snippet: <label id="email-label" for='"email">Email</label> remove the single quote (') after the equals symbol (=) in the for attribute.
Fifth: In step 6 of the Build a Survey Form lesson it says “If you enter an email that is not formatted correctly, you will see an HTML5 validation error”. You can satisfy this request by changing the value of the type attribute in the <input> tag. You put the value "text", there is another suitable value for email.
Sixth: In the “Age” label you inform the form that the age is optional, but in your <input> you have written the “required” attribute. This means that the user will be required to fill in this input. I suggest removing the word “(optional)” from the label.
Seventh: In the <input> of the “Option two” checkbox you forgot to put the symbol greater than “>” in the closing tag of </label>.
Eight: The <form> element is nested inside the <body> element, so the closing tag of </form> comes before the closing tag of </body>. You need to change this order.
Ninth: You forgot the closing </html> tag of the <html> element.
@gustavo.afc , thank you very much. your support really helped me. sorry i didn’t get back to you as soon as possible. i wasn’t feeling well but am back in the game. i have finished the survey form project and i passed.
please how do i get the Visual Studio Code?