HTML Select List Option

HTMLBeginner
Practice Now

Introduction

The HTML <option> tag is used to define the options in a drop-down list in an HTML form. It is attached to the <select> tag and its variants such as <datalist> and <optgroup>. This tag helps users make a selection from a list of choices. This lab will guide you through the steps to implement an HTML drop-down list using the <option> tag.

Note: You can practice coding in index.html and learn How to Write HTML in Visual Studio Code. Please click on 'Go Live' in the bottom right corner to run the web service on port 8080. Then, you can refresh the Web 8080 Tab to preview the web page.

Create a
element

Create an HTML file named index.html in your preferred text editor.

Start by creating a basic HTML form:

<form></form>

Create a