Forms are normally used to submit information across the internet by the user browser and is commonly known as the Client.

The form tag


Form Attributes

1. action specifies the destination of the information being sent

2. method

  • Specifies the way the information has to be sent
  • Two methods - POST and GET

Form Elements - Input Tag

1. Text fields

  <input type="text" />

2. Password

 <input type="password" />

3. Check box

  <input type="checkbox" />

4. Radio button

  <input type="radio" />

5. Submit button

  <input type="submit" />

6. Reset button

  <input type="reset" />

7. Other button

  <input type="button" />

8. Image working like submit button

  <input type="image" src="" name="submit" />

Attributes of Input tag

1. name - associated with a text field

2. size - length of characters in an input field

3. checked - For check box

4. max length - maximum characters allowed

5. value - For text and password field, value is the text that has been typed - Radio button and check box - Submit and Reset button - values used to display text on a button

Example of form with input tag to send text by URL

<!doctype html>
    <input name="myURL" type="text">

Text Area Tag and Attributes



  • name
  • wrap = physical - to allow words to wrap in text area
  • height and width
  • cols and rows


  • name
  • size - number of items to be displayed at one time
  • multiple select
  <select multiple>...</select>
  • Selected
  <option selected>...<option>

Shameem 17:04, 22 July 2007 (UTC)

Further reading

  • W3.org: "Forms" is the official reference.

Learning HTML
Previous: Frames in HTML Next: Web Design/HTML Challenges
This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.