<body>
      <form>
        <label for="fruit">Choose your fruit :</label>
        <input list="fruits">
        <datalist id="fruits">
          <option value="Apple">
          <option value="Orange">
          <option value="Banana">
          <option value="Mango">
          <option value="Avocado">
        </datalist>
        <input type="submit" value="Submit">
      </form>
    </body>
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.