When writing in HTML, the
Example of
Example result
If you hover your mouse cursor over the right side of the box, a down arrow appears. Click this arrow to choose your favorite animal.
The
- Example of
- Example result
- Example with larger box
- Attributes
- Compatibility
- Additional form elements
- Related information
Example with larger box
In addition to having a drop-down box, a larger select box allows more options or all available options to show using the size attribute. Below we added size=“10” to the select tag to allow ten items to fit in the box.
Attributes
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for the
We’ve also added multiple to the select tag to allow multiple items to be selected in the above box. To select multiple items, hold down the Ctrl on the keyboard and click each item you want to select.
Compatibility
Additional form elements
Browser, Compatibility, Container tag, Web design terms
Related information
- How to delete autocomplete history.
- How to enable or disable autocomplete in a web browser.
- Individually remove page, search, or text in the search bar.
- HTML and web design help and support.