English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML select form attribute

The form attribute specifies one or more forms that the dropdown list belongs to.

HTML5 <select> Tag

Online Example

An example dropdown list outside (but still part of) the form:

<form action="action_page.php" id="carform">
  Firstname:<input type="text" name="fname">
  <input type="submit">
</form>
<br>
<select name="carlist" form="carform">
  <option value="PHP">PHP</option>/option>
  <option value="Python">Python</option>
  <option value="C#">C#</option>
  <option value="Golang">Golang</option>
</select>
Test See ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Firefox, Opera, Chrome, and Safari support the form attribute.

Note:Internet Explorer does not support the form attribute of the <select> tag.

Definition and Usage

The form attribute specifies one or more forms that the dropdown list belongs to.

HTML 4.01 and HTML5differences between

The form attribute in HTML5 New attribute added in.

Syntax

        <select form="form_id"

Attribute Value

ValueDescription
form_idSpecifies the form element that the <select> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.
 HTML <select> tag