Web Technology Questions and Answers – Form Controls

This set of Web Technology Multiple Choice Questions & Answers (MCQs) focuses on “Form Controls”.

1. Which of the following is not a type of Form control?
a) Text input controls
b) Checkboxes and radio buttons
c) Circular buttons
d) Hidden controls
View Answer

Answer: c
Explanation: Possibly the most famous text input box is the one right in the middle of the Google homepage that allows you to enter what you are searching for. Hidden controls are used to pass information between the pages without the user getting to see it.

2. How many types of Text Inputs are possible?
a) Many
b) Only one
c) Two
d) Three
View Answer

Answer: d
Explanation: There are three types of Text Inputs in the form. Single – line text input controls, Password input controls, Multi – line text input controls are the three kinds of types of Text Input Boxes. On a printed form, the equivalent of a text input is a box or line in or on which you write a response.

3. What are password input controls in a Form?
a) They mask the characters a user enters so that the characters cannot be seen on the screen
b) They are used to give a hint of the password set by the user
c) They are used to display the error image of wrong password format
d) They are used to set passwords to default or to no password
View Answer

Answer: a
Explanation: They tend to either show an asterisk or a dot instead of each character the user types, so that someone cannot simply look at the screen to see what a user types in. Password input controls are mainly used for entering passwords on login forms or sensitive details such as credit card numbers.
advertisement
advertisement

4. When an <input> element’s type attribute has a value of text, it can carry which attributes?
a) All the universal attributes including disabled, readonly, tabindex, and accesskey
b) All the universal attributes except disabled, readonly, tabindex, and accesskey
c) Only disabled, readonly, tabindex and accesskey
d) All the universal attributes
View Answer

Answer: a
Explanation: Just as some people try to start form names with the characters frm, it is also common to start text input names with the characters txt to indicate that the form control is a textbox. This can be particularly handy when working with the data on the server, to remind you what sort of form control sent that data.

5. The text inside the <textarea> element is indented?
a) True
b) False
View Answer

Answer: b
Explanation: Anything written between the opening and closing <textarea> tags is treated as if it were written inside a <pre> element, and formatting of the source document is preserved. If the words “Enter your feedback here” were indented in the code, they would also be indented in the resulting multi – line text input on the browser.

6. Which is not a possible value for wrap?
a) off
b) virtual
c) physical
d) on
View Answer

Answer: d
Explanation: The off (the default), which means scrollbars are added to the box if the user’s words take up more space than the allowed width. The virtual , which means that wherever the text wraps, users see it on the new line. The physical, which means that wherever the user sees the text start on a new line, so will the server.

7. The value which doesn’t belong to the Button is?
a) modify
b) submit
c) reset
d) button
View Answer

Answer: a
Explanation: Submit, which creates a button that submits a form when pressed. Reset, which creates a button that automatically resets form controls to their initial values as they were when the page loaded. Button which creates a button that is used to trigger a client-side script when the user clicks that button.
advertisement

8. What are Select Boxes?
a) Another name for Radio Buttons
b) Another name for Check Boxes
c) It is a drop down with select boxes present in it
d) Simple select boxes which are available in the form
View Answer

Answer: c
Explanation: A drop-down select box allows users to select one item from a drop-down menu. Drop – down select boxes can take up far less space than a group of radio buttons. Drop-down select boxes can also provide an alternative to single-line text input controls where you want to limit the options that a user can enter.

9. What is Multiple attribute used for?
a) It helps in selecting multiple select boxes
b) It is used to provide multiple select boxes in a Form
c) It is used to select one box out of many select boxes available in the Form
d) It is used to create a Select box in a existing Select box
View Answer

Answer: a
Explanation: The multiple attribute allows users to select more than one item from a select box. The value of the multiple attribute should be the word multiple for it to be valid XHTML (although earlier versions of HTML allowed this attribute to appear without a value).
advertisement

10. What are hidden controls?
a) They are invisible to the user which are decided by the server
b) They are the advanced controls in a Form
c) Hidden controls are default options/controls in a form
d) They are used to pass information without user knowing about it
View Answer

Answer: d
Explanation: Sometimes you will want to pass information between pages without the user seeing it; to do this, you can use hidden form controls. But, while users cannot see them in the web page, if they were to look at the source code for the page they would be able to see the values in the code.

Sanfoundry Global Education & Learning Series – Web Technology.

To practice all areas of Web Technology, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.