I don't understand question 13,14,

Yes, but ‘name-label’ is not ‘name’

1 Like

So I need to add another id to the input name with value name?

1 Like

You can only have one id for an HTML element. You must use the id that the instructions told you to use.

1 Like

Все очень запутанно, если мы указываем имя в id, то в метке также указывается имя, а потом ошибка говорит, что имя должно быть указано в метке и как это понять?

1 Like

You need to use an id of name-label for the label and an id of name for the name input.

Please post actual code instead of pictures of your code.

1 Like
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
<body>
<h1 id="title">Форма опроса freeCodeCamp</h1>
<p id="description">Благодарим вас за то, что нашли время помочь нам улучшить платформу</p>

<form id="survey-form">

  <fildset>
  <label for="name">Name<input id="name" name="name" type="text" placeholder="Enter your name" required></label>
 <label for="email">Email<input id="email" name="email" type="email" placeholder="Enter your Email" required></label>
 <label for="number">Age
(optional)<input id="number" name="number" type="number" min="3" max="10" placeholder="Age" required ></label>
<label for="dropdown">Which option best describes your current role?
  <select id="dropdown">
    <option>Select current role</option>
    <option>Student</option>
    <option>Full Time Job</option>
    <option>Full Time Learner</option>
    <option>Prefer not to say</option>
    <option>Other</option>
  </select>
  </label>
</fildset>

<fieldset>
  <label>Would you recommend freeCodeCamp to a friend?
  <label><input type="radio" name="count2">Definitely</label>
  <label><input type="radio" name="count2">Maybe</label>
  <label><input type="radio" name="count2">Not sure</label>
  </label>
</fieldset>

<fieldset>
  <label>What is your favorite feature of freeCodeCamp?
    <select>
    <option value="">Select an option</option>
    <option value="1">Challenges</option>
    <option value="2">Projects</option>
    <option value="3">Community</option>
    <option value="4">Open Source</option>
    </select>
  </label>
</fieldset>

<fieldset>
  <label>What would you like to see improved? (Check all that apply)
    <label><input type="checkbox">
Front-end Projects</label>
    <label><input type="checkbox">
Back-end Projects</label>
    <label><input type="checkbox">Data Visualization</label>
    <label><input type="checkbox"></label>
    <label><input type="checkbox">ChallengesOpen Source Community</label>
    <label><input type="checkbox">
Gitter help rooms</label>
    <label><input type="checkbox">Videos</label>
    <label><input type="checkbox">City Meetups</label>
    <label><input type="checkbox">Wiki</label>
    <label><input type="checkbox">Forum</label>
    <label><input type="checkbox">Additional Courses</label>
  </label>
</fieldset>

<fieldset>
  <label for="text">Any comments or suggestions?
    <textarea id="text" name="text" row="3" cols="30" placeholder="Enter your comment here..."></textarea>
  </label>
</fieldset>
<input type="submit" value="Submit">
  </form>
  
  </body>
  </html>
1 Like

This element doesn’t have the required id

1 Like

I already did but it still doesn’t work

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
<body>
<h1 id="title">Форма опроса freeCodeCamp</h1>
<p id="description">Благодарим вас за то, что нашли время помочь нам улучшить платформу</p>

<form id="survey-form">

  <fildset>
  <label for="name-label">Name<input id="name" name="name" type="text" placeholder="Enter your name" required></label>
 <label for="email-label">Email<input id="email" name="email" type="email" placeholder="Enter your Email" required></label>
 <label for="number-label">Age
(optional)<input id="number" name="number" type="number" min="3" max="10" placeholder="Age" required ></label>
<label for="dropdown">Which option best describes your current role?
  <select id="dropdown">
    <option>Select current role</option>
    <option>Student</option>
    <option>Full Time Job</option>
    <option>Full Time Learner</option>
    <option>Prefer not to say</option>
    <option>Other</option>
  </select>
  </label>
</fildset>

<fieldset>
  <label>Would you recommend freeCodeCamp to a friend?
  <label><input type="radio" name="count2">Definitely</label>
  <label><input type="radio" name="count2">Maybe</label>
  <label><input type="radio" name="count2">Not sure</label>
  </label>
</fieldset>

<fieldset>
  <label>What is your favorite feature of freeCodeCamp?
    <select>
    <option value="">Select an option</option>
    <option value="1">Challenges</option>
    <option value="2">Projects</option>
    <option value="3">Community</option>
    <option value="4">Open Source</option>
    </select>
  </label>
</fieldset>

<fieldset>
  <label>What would you like to see improved? (Check all that apply)
    <label><input type="checkbox">
Front-end Projects</label>
    <label><input type="checkbox">
Back-end Projects</label>
    <label><input type="checkbox">Data Visualization</label>
    <label><input type="checkbox"></label>
    <label><input type="checkbox">ChallengesOpen Source Community</label>
    <label><input type="checkbox">
Gitter help rooms</label>
    <label><input type="checkbox">Videos</label>
    <label><input type="checkbox">City Meetups</label>
    <label><input type="checkbox">Wiki</label>
    <label><input type="checkbox">Forum</label>
    <label><input type="checkbox">Additional Courses</label>
  </label>
</fieldset>

<fieldset>
  <label for="text">Any comments or suggestions?
    <textarea id="text" name="text" row="3" cols="30" placeholder="Enter your comment here..."></textarea>
  </label>
</fieldset>
<input type="submit" value="Submit">
  </form>
  
  </body>
  </html>
1 Like

Where is the id for this element? I don’t see it.

Also, you have a for attribute for this element, but it will not work correctly, as that for does not correspond to the id of the input element.

1 Like

So if there should be only one id in the input, then I cannot add the second id or can I?

1 Like

The input must have one id. It must be the id you are told to use.

The label must have one id. It must be the id you are told to use.

If your label has a for attribute, that attribute must correspond to the id of the input.

1 Like

Of course I can’t figure it out, so my code doesn’t work again.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
<body>
<h1 id="title">Форма опроса freeCodeCamp</h1>
<p id="description">Благодарим вас за то, что нашли время помочь нам улучшить платформу</p>

<form id="survey-form">

  <fildset>
  <label for="name-label">Name<input id="name" id="name-label" name="name" type="text" placeholder="Enter your name" required></label>
 <label for="email-label">Email<input id="email" id="email-label" name="email" type="email" placeholder="Enter your Email" required></label>
 <label for="number-label">Age
(optional)<input id="number" name="number" id="number-label"  type="number" min="3" max="10" placeholder="Age" required ></label>
<label for="dropdown">Which option best describes your current role?
  <select id="dropdown">
    <option>Select current role</option>
    <option>Student</option>
    <option>Full Time Job</option>
    <option>Full Time Learner</option>
    <option>Prefer not to say</option>
    <option>Other</option>
  </select>
  </label>
</fildset>

<fieldset>
  <label>Would you recommend freeCodeCamp to a friend?
  <label><input type="radio" name="count2">Definitely</label>
  <label><input type="radio" name="count2">Maybe</label>
  <label><input type="radio" name="count2">Not sure</label>
  </label>
</fieldset>

<fieldset>
  <label>What is your favorite feature of freeCodeCamp?
    <select>
    <option value="">Select an option</option>
    <option value="1">Challenges</option>
    <option value="2">Projects</option>
    <option value="3">Community</option>
    <option value="4">Open Source</option>
    </select>
  </label>
</fieldset>

<fieldset>
  <label>What would you like to see improved? (Check all that apply)
    <label><input type="checkbox">
Front-end Projects</label>
    <label><input type="checkbox">
Back-end Projects</label>
    <label><input type="checkbox">Data Visualization</label>
    <label><input type="checkbox"></label>
    <label><input type="checkbox">ChallengesOpen Source Community</label>
    <label><input type="checkbox">
Gitter help rooms</label>
    <label><input type="checkbox">Videos</label>
    <label><input type="checkbox">City Meetups</label>
    <label><input type="checkbox">Wiki</label>
    <label><input type="checkbox">Forum</label>
    <label><input type="checkbox">Additional Courses</label>
  </label>
</fieldset>

<fieldset>
  <label for="text">Any comments or suggestions?
    <textarea id="text" name="text" row="3" cols="30" placeholder="Enter your comment here..."></textarea>
  </label>
</fieldset>
<input type="submit" value="Submit">
  </form>
  
  </body>
  </html>
1 Like

You stil have no id attribute here.

You have added two id attributes to the same HTML element again. You cannot do that.


Do you know what an input element is?

Do you know what a label element is?

Do you know what the id attribute is and how to set it equal to a value?


Expanding on this:

Your input element must have an id attribute, set equal to the value you are required to use.

Your label element must have an id attribute, set equal to the value you are required to use.

1 Like

For example, if I wanted someone to enter their favorite color, I might have this:

<label for="favorite-color">Favorite Color
  <input
    id="favorite-color"
    name="favorite-color"
    type="text"
    placeholder="Enter your favorite color"
  >
</label>

Don’t worry about the spacing - that’s just to make it easier to read.

The input has an id. (Things can only have one id and that id can’t be used anywhere else on the site.) The label has a for attribute that tells it what id to look for, to know to what it is associated.

1 Like

Я так понял, что на входе должен быть один id, но вы говорите, что нужно создать некую фору, так где ее создавать?

1 Like

I don’t know what you mean by “create some kind of handicap”.

1 Like
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
<body>
<h1 id="title">Форма опроса freeCodeCamp</h1>
<p id="description">Благодарим вас за то, что нашли время помочь нам улучшить платформу</p>

<form id="survey-form">

  <fildset>
  <label for="name-label">Name<input id="name" name="name" type="text" placeholder="Enter your name" required></label>
 <label for="email-label">Email<input id="email"  name="email" type="email" placeholder="Enter your Email" required></label>
 <label for="number-label">Age
(optional)<input id="number" name="number"  type="number" min="3" max="10" placeholder="Age" required ></label>
<label for="dropdown">Which option best describes your current role?
  <select id="dropdown">
    <option>Select current role</option>
    <option>Student</option>
    <option>Full Time Job</option>
    <option>Full Time Learner</option>
    <option>Prefer not to say</option>
    <option>Other</option>
  </select>
  </label>
</fildset>

<fieldset>
  <label>Would you recommend freeCodeCamp to a friend?
  <label><input type="radio" name="count2">Definitely</label>
  <label><input type="radio" name="count2">Maybe</label>
  <label><input type="radio" name="count2">Not sure</label>
  </label>
</fieldset>

<fieldset>
  <label>What is your favorite feature of freeCodeCamp?
    <select>
    <option value="">Select an option</option>
    <option value="1">Challenges</option>
    <option value="2">Projects</option>
    <option value="3">Community</option>
    <option value="4">Open Source</option>
    </select>
  </label>
</fieldset>

<fieldset>
  <label>What would you like to see improved? (Check all that apply)
    <label><input type="checkbox">
Front-end Projects</label>
    <label><input type="checkbox">
Back-end Projects</label>
    <label><input type="checkbox">Data Visualization</label>
    <label><input type="checkbox"></label>
    <label><input type="checkbox">ChallengesOpen Source Community</label>
    <label><input type="checkbox">
Gitter help rooms</label>
    <label><input type="checkbox">Videos</label>
    <label><input type="checkbox">City Meetups</label>
    <label><input type="checkbox">Wiki</label>
    <label><input type="checkbox">Forum</label>
    <label><input type="checkbox">Additional Courses</label>
  </label>
</fieldset>

<fieldset>
  <label for="text">Any comments or suggestions?
    <textarea id="text" name="text" row="3" cols="30" placeholder="Enter your comment here..."></textarea>
  </label>
</fieldset>
<input type="submit" value="Submit">
  </form>
  
  </body>
  </html>

here again the code is already with one id but nothing works,

1 Like

Do you see this code right here that I keep quoting? This label element needs an id attribute. Can you see which element I am talking about?

Also, that for attribute needs to match the id attribute of the input.

1 Like
 <label for="name-label" id="name">Name<input id="name" name="name" type="text" placeholder="Enter your name" required></label>?
1 Like

Yes, that is some code. Do you have a question about that code?

This is not the id the instructions told you to use.

Also,

1 Like