I don't understand how to change this html from displaying a string to displaying relevant suggestions in a drop down format that when clicked will fill the input box. How do I do that?

HTML Code:
<body>
   <form>
    First name: <input type="text" onkeyup="showHint(this.value)" size="20" />
  </form>
  <p>Suggestions: <span id="txtHint"></span></p>
</body>