I am getting an error with the following code. I have checked out YT videos and my code seems right, but will not accept. Any ideas, please
Step 37
Submitting the form with an option selected would not send a useful value to the server. As such, each option
needs to be given a value
attribute. Without which, the text content of the option
will be submitted to the server.
Give the first option
a value
of ""
, and the subsequent option
elements value
attributes from 1
to 4
.How did you hear about us?
CODE:
<select>
<option value:"">(select one) </option>
<option value:"1">freeCodeCamp News</option>
<option value:"2">freeCodeCamp YouTube Channel</option>
<option value:"3">freeCodeCamp Forum</option>
<option value:"4">Other</option>
ERROR:
Sorry, your code does not pass. Hang in there.
You should give the first option
a value
of ""
.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
remember in HTML we use equal sign not colon
1 Like
Thank you hbar1st, I am new to this and my first post. I will know for future.
1 Like
Never seen that mistake. Could not see the woods for the trees.
Thank you so much for your help!
1 Like
Surprisingly the code now passes…![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
2 Likes
if i can suggest for you, when you want to post here about a fCC challenge, the best way is through clicking the Help button in the step (it shows up if you try three times to check your work and fail to pass).
This button shows a template which includes a link to the step to help us understand your question, as well as areas to fill out with your question and code.
Hope you enjoy your learning journey and all the best.
1 Like