</> Code Corner

HTML · HTML Forms · Lesson 42

HTML Form Elements

select, textarea, button, fieldset and datalist.

Besides <input>, forms can contain: <label>, <select>, <textarea>, <button>, <fieldset>, <legend>, <datalist>, <output> and <option>.

Select (drop-down list)

Example

<label for="cars">Choose a car:</label>
<select id="cars" name="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="fiat" selected>Fiat</option>
</select>

Textarea

Keep reading “HTML Form Elements”

Sign up to read the full lesson (5 more parts), try every example in the live editor, and take the 5-question quiz.

Chat with us 👋