Survey Form - Build a Survey Form

Tell us what’s happening:
Describe your issue in detail here.

I understand how to code it, but in the label element for the project, what purpose does the id=‘name-label’ or email-label or number-label serve?
Your code so far

/* file: index.html */
<!DOCTYPE HTML>
<html lang='en'>
<head> 
  <meta charset='UTF-8'>
  <title>Feedback Form</title>
  <link rel="stylesheet" href="styles.css"/>
</head>
  <body>
    <h1 id='title'>Pizza Steve's Pizza Company</h1>
  <p id='founding'>Est. 4/20/69</p>
  <p id='description'>Whatcha think of our pepperoni pizzas, bitches?</p>
  </body>
<form id='survey-form'>
 <fieldset>
   <label id='name-label'>Name <input id='name' type='text' required></label>
   <label id='email-label'>Email<input id='email' type='email' required></label>
   <label id='number-label'>Age<input id='number' type='number' min='13' max='120' required> </label>
 </fieldset> 
</form>
</html>
/* file: styles.css */
body{
width: 100%; 
background-color:1b1b32;
 color: white;
}
h1, p{
text-align: center ;
}
form{
 text-align: left;
 padding: 3px;
}
label{
 display: block;
}

   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

The id parameter is used when we want to make a unique identification of an HTML tag, in this challenge I think it is not required but if you had two types of the same button with the id you can edit them individually

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