HTML Forms

<form> Element

<form>

</form>

<input type=”text”> Defines a text input field
<input type=”radio”> Defines a radio button (Choose one of many options)
<input type=”submit”> Defines a submit button (for submitting the form)

<input type=”text” id=”firstname” name=”firstname”>

<select> element defines a drop-down list:

<select id=”cars” name=”cars”>
<option value=”volvo”>Volvo</option>
<option value=”saab”>Saab</option>
<option value=”fiat”>Fiat</option>
<option value=”audi”>Audi</option>
</select>

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

<textarea name=”message” rows=”10″ cols=”30″>
The cat was playing in the garden.
</textarea>

rows attribute specifies adding number of rows in a text area.