www.pickatutorial.com Computer Tutorials
Top eBooks: C/C++ | C# | Android | Mathematics | Database | Cloud | Graphics | Networking | Oracle | Hardware | AI
Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script| CSS
Lessons Text box and Textarea Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
Lesson 28
Lesson 29
Lesson 30
Lesson 31
Lesson 32
Lesson 33
Lesson 34
Lesson 35
Lesson 36
HTML Form Elements:

Text Field:

Text field or text box is used to enter text data. A text field is added to a web page as under:

This is a text field <input type="text" name="text">

The output will be:

This is a text field

Most of the form elements are added using the <input> tag. The value of the type attribute specifies the kind of the element. The name attribute is used at the server-side to access the user entered data.

Password Field:

The password field can be added as under:

This is a password field <input type="password" name="pw">

The output will be:

This is a password field

The password field is the same as the text field with only one difference. When entering data in a password field, the user cannot see it. The data appears as all asterisks (*).

Textarea Field:

The text field is a single line input field. If we want a multiline text input field we use a textarea field. The required code to add a textarea field is as under:

This is a textarea field <textarea name="textarea" rows="10" cols="35"></textarea>

The output will be:

This is a textarea field

The height and width of a textarea field can be controlled using the cols and rows attributes of the <textarea> tag. You can increase or decrease them in order to get a bigger or a smaller textarea field.
Next >>> Lesson No. 32: Radio, Select and Checkbox







Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.