Build a survey form

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset= "utf-8">
    <link rel="stylesheet" href="styles.css">
    <title>Terra Rosa survey</title>
  </head>
    
  <body>
    <h1 id="title">How was your shopping experience at Terra Rosa?</h1>
    <p id="description">We just want to know how your shopping experience was.</p>
    <form id="survey-form">
      <fieldset>
        <label id="name-label">Name <input id="name" type="text" placeholder="Enter your name" required></label>
        <label id="email-label">Email <input id="email" type="email" placeholder="Enter your email" required></label>
        <label id="number-label">Age <input id="number" type="number" min="16" max="100" placeholder="25"></label>
      </fieldset>
      <fieldset>
        <label>Rate your shopping experience
          <select id="dropdown">
            <option value="">Choose one</option>
            <option value="1">Definitely amazing</option>
            <option value="2">It was okay</option>
            <option value="3">Bad</option>
          </select>
        </label>

      </fieldset>
      <fieldset>
        <label>Would you recommend Terra Rosa?</label>

          <label><input type="radio" name="attribute" value="1">Yes! Definitely.</label>
          <label><input type="radio" name="attribute" value="2">I think so.</label>
          <label><input type="radio" name="attribute" value="3">Maybe not.</label>
          
      </fieldset>
      <fieldset>
        <label>What would your next purchase be?</label>
        <label><input type="checkbox" value="Roses">Roses</label>
        <label><input type="checkbox" value="Flower bouquet">Flower bouquet</label>
        <label><input type="checkbox" value="Balloons">Balloons</label>
        <label><input type="checkbox" value="Gift card">Gift card</label>
      </fieldset>
      <fieldset>
        <label>How can we make our service better?
          <textarea rows="5" cols="50" placeholder="Enter your comment here..."></textarea>
        </label>
      </fieldset>
      <fieldset>
        <input type="submit" value="Submit" id="submit" />
      </fieldset>
    </form>
  </body>type or paste code here

**Can someone assist why my name, email and age are inline? How can I fix them to follow the format that was given?


**

Missing “name” attribute on radio input elements:
The code snippet you provided seems to be fairly well formatted and complete. However, there are some potential pitfalls you should consider.

1 Like

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