title: Creating a HTML drop-down list date: 2021 Oct 01 updated: 2024 Jan 26 In order to create a drop-down selection list in HTML, we must first understand why they are important. Drop-down lists can be used in lots of ways, from creating a way for people to chose from a strict set of options, to making an on-off switch(even though you should use buttons for that). Before we start, here is an example: **Select Image:** Images from Wikipedia, on Oct. 2nd & 1st, 2021 For some weird reason, it's not in ``, it has it's own tags: ` ``` Like all `input`s, `select` can have an id and name, and like `input[type=radio]`, `option` can have a value. However, you may not know some things that could be useful here, such as defaulting, or making things update upon being changed, well, you can do defaulting with `selected` in the ` ``` Inorder to access the selected option with JavaScript, use `document.getElementById("selection").value`. That's basically it, feel free to `CTRL + C` `CTRL + V` it. /s