The HTML <form> Elements

The HTML

element can contain one or more of the following form elements:
<input>
<label>
<select>
<textarea>
<button>
<fieldset>
<legend>
<datalist>
<output>
<option>
<optgroup>

The <input> Element

Output:

The <select> element defines a drop-down list:

Output:

Use the size attribute to specify the number of visible values:

Output:

Allow Multiple Selections:

Use the multiple attribute to allow the user to select more than one value:

Output:

The <textarea> Element

The <textarea> element defines a multi-line input field (a text area):

Output:

The <fieldset> and <legend> Elements

The <fieldset> element is used to group related data in a form.
The <legend> element defines a caption for the <fieldset> element.

Output:

The <datalist> Element

Output:

The <output> Element

Output: