Website Design Edmonton       Website Design Feedback       Website Design Sitemap     Contact Website Design Company
Website Designers R Us - Home
Text Area Check Box and Radio Buttons

Text Area Check Box and Radio ButtonsText Area

Using text area, users can enter multiple lines of text. For instance, you may enter comments or paste your resume inside a text area. They are applied using <TEXTAREA></TEXTAREA> tag. By applying the above code, you will get a default text area. However, you can increase its width and height by applying its ROWS and COLS attribute.

Check Box

Check boxes enable you to choose a list of items. For instance, you may select your hobbies using these boxes. A tick mark appears inside the box. If you again check the box, the tick mark goes away. Look at the code fragment given below:

Listing 22

    Select a Language:
    <input type = "checkbox" name = "t1" checked>Java
    <input type = "checkbox" name = "t2">C++
    <input type = "checkbox" name = "t3">Oracle
    <input type = "checkbox" name = "t4">C-Sharp

By default, Java will be checked. Notice the checked attribute on the second line of the code.

Radio Buttons

With radio buttons, you can select only one item at a time. But with check boxes, you can pick any number of items. For instance, you may select the sex (either male or female) using these boxes as shown below.

Listing 23

    Select your sex:
   <input type = "radio" name = "r1">Male
   <input type = "radio" name = "r1">Female

You should give the same name for the attribute name. Otherwise, you will not get the functionality of radio buttons.

The above pieces of codes can be combined into one single page as shown in Listing 24

Listing 24

<HTML>
<HEAD><TITLE>HTML Forms</TITLE></HEAD>
<BODY>
<FORM action = "
mailto:yourname@server.com" method = "post">
Enter your Name:  <input type = "text" name = "t1"
maxlength = 20 size = 25>
Enter your Password: <input type = "password" name = "p1">
Select a Language: 
<input type = "checkbox" name = "t1" checked>Java
<input type = "checkbox" name = "t2" checked>C++
<input type = "checkbox" name = "t3" checked>Oracle
<input type = "checkbox" name = "t4" checked>C-Sharp
Select your sex: -
<input type = "radio" name = "r1">Male
<input type = "radio" name = "r1">Female
 <CENTER><input type = "submit" name = "s1">
<input type = "reset" name = res1"></CENTER>
<SELECT name = "s1">
<OPTION>India
<OPTION>USA
<OPTION>UK
</SELECT>

The above code submits the information entered by the user to the email address specified in the Form tag’s action attribute. Notice the mailto syntax inside the Form tag.

Return to Listing

Website Designers R Us is a professional Internet strategy and Web design company based in Toronto, Canada. We specialize in best-in-class website design, online marketing, Flash multimedia, corporate identity and print graphics. Website Designers R Us features an integrated team of web consultants, creative designers, writers, programmers and marketing professionals that know how to get online results
 Home          ::             About Us          ::             Support            ::             Services            ::             Link Partners          ::             Contact

Copyright © 2006-2011 Website Designers R Us, a DOT Specialist Company. All rights reserved.