Learn Form Validation by Building a Calorie Counter - Step 47

Tell us what’s happening:

Console is continously showing an error that you should have your label element in the template literal.

Your code so far

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

/* file: script.js */
// User Editable Region

  const HTMLString = `<label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>`;

// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 47

the starting code was this

  const HTMLString = `
  
  `;

you removed new lines from there

It’s still not working

what is your code now?

edit: you added something you were not asked to add, try reading carefully the instructions and remove it

<label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>

you added something you were not asked to add, try reading carefully the instructions and remove it

yes i removed for attribute its work

Thank you very much.