Learn Form Validation by Building a Calorie Counter - Step 46

Tell us what’s happening:

What is wrong with my code im trying 2 days please HELP and it tells me that ( You should have a label element inside your template literal.)

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region
const HTMLString = `
  <label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>
`;

// User Editable Region

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 46

make sure you add only what’s asked, otherwise the tests are confused. I don’t see anywhere in the instructions to add a for attribute

1 Like

thank you YOU SAVED ME