Build a survey form

<!DOCTYPE html>
<html lang="en">
    <meta charset= "utf-8">
    <link rel="stylesheet" href="styles.css">
    <title>Terra Rosa survey</title>
    <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">
        <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>
        <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>

        <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>
        <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>
        <label>How can we make our service better?
          <textarea rows="5" cols="50" placeholder="Enter your comment here..."></textarea>
        <input type="submit" value="Submit" id="submit" />
  </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.