Explain all controls that are created with the input tag with examples which are used for text collection

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions
PROGRAMMING-THE-WEB-10CS73-->View question


Explain all controls that are created with the input tag with examples which are used for text collection?

Asked for (08 Marks) (Jun/July -2015)

By:Rajiv

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

Talk about thisDelete|Like|Dislike|


Answers

Many of the commonly used controls are specified with the inline tag

<input>

including those for text, passwords, checkboxes, radio buttons, and the action buttons Reset, Submit, and plain. 

Text Box

 It is a type of input which takes the text.

 Any type of input can be created using input

 The type attribute indicates what type of input is needed for the text box, the value should be given as text.

 For any type of input, a name has to be provided which is done using name attribute.  The size of the text can be controlled using size attribute.

 Every browser has a limit on the number of characters it can collect. If this limit is exceeded, the extra characters are chopped off. To prevent this chopping, maxlength attribute can be used. When maxlength is used, users can enter only those many characters that is given as a value to the attribute. 

Password Box

� If the contents of a text box should not be displayed when they are entered by the user, a password control can be used.

� In this case, regardless of what characters are typed into the password control, only bullets or asterisks are displayed by the browser. 

Radio Button

 Radio buttons are special type of buttons which allows the user to select only individual option

 Radio buttons are created using the input tag with the type attribute having the value radio.

 When radio buttons are created, values must be provided with the help of value attribute.

 All the radio buttons which are created would have same name. This is because the radio buttons are group elements.

 If one of the radio buttons has to be selected as soon as the web page is loaded, checked attribute should be used. The value also would be checked

Check Box

 Check box is a type of input using which multiple options can be selected.

 Check box can also be created using the input tag with the type having the value “checkbox”.

 During the creation of check box, the value should be provided using the value attribute.

 All the checkbox which are created would have the same name because they are group elements.

 If one of the check box have to be selected as soon as the page is loaded, checked attribute should be used with the value checked



arunwebber

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!