[Bug] Build a survey form - Test case failing for textarea element that is a descendant of #survey-form

Tell us what’s happening:
The test case fails: " You should have at least one textarea element that is a descendant of #survey-form ". I already have it as a descendant as you can see the code below

Your code so far

<meta charset="utf-8">

<title>Untitled</title>

<meta name="description" content="This is an example of a meta description.">

<link rel="stylesheet" type="text/css" href="theme.css">

<!--[if lt IE 9]>
<![endif]-->
<h1 id = "title">Karan Balaji Survey Form</h1>
<p id="description">Thank you for taking the time to view this project</p>

<fieldset>

<form id ="survey-form">

  

  <label id ="name-label">Name </label>

  <input id="name" type="text" placeholder="Enter your name" required="Your name is required"</input>

  <label id ="email-label">Email</label>

  <input id="email" type="email" placeholder="example@site.com" required="Please enter a valid email"></input>

  <label id ="number-label">Age </label>

  <input id="number" type="number" placeholder="Your age" min="10" max="99"></input>

  <label>Which option best describes your current role?</label>

  <select id="dropdown"> 

  <option>Student</option>

  <option>Professional</option>

  <option>Unemployed</option>

  </select>

  <label>Would you recommend this project to a friend ?</label>

  <input type="radio" name="survey" value="survey">

  <label>Yes</label>

  </input>

  <input type="radio" name="survey" value="survey">

  <label>No</label>

  </input>

  <label>What would you like to see improved? </label>

  <input type="checkbox" value="feedback">

  <label>UI Design</label>

  </input>

  <input type="checkbox" value="feedback">

  <label>Content Writing</label>

  </input>

  <input type="checkbox" value="feedback">

  <label>User Experience</label>

  </input>

  <label>Any comments or suggestions?</label>

  <input type="textarea" placeholder="Enter your comment here">

  </input>

    <button id="submit">Submit</button>

  </form>

   

  </fieldset>
WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy-to-read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Challenge: Build a Survey Form

Link to the challenge:

1 Like

Hi @karanbalaji !

Welcome to the forum!

Instead of this you need to use the textarea element.

2 Likes

Also, just as an aside.

The input element is an empty element, it does not take content. You can not nest a label element inside an input element. You can do the opposite though.

Thank you, this worked.

Ah it makes sense. Thank you for explaining :slight_smile: !

do any errors you seeing in adding textarea element …
Add your commets on here

This should not be an input type, it is simply:

<textarea name="comments" rows="3" cols="30" placeholder="All comments here..."></textarea>

It was already explained, did you read the thread?

<textarea> is its own element, there is no such thing as type="textarea" on an input element (valid types).

Use the <textarea> element instead.

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