0% found this document useful (0 votes)
21 views3 pages

English

The document provides an introduction to HTML forms, explaining how to create text boxes, password fields, and radio buttons for user input. It includes examples of HTML code for each input type and outlines true/false and multiple-choice questions to test understanding of the material. Key concepts include the purpose of forms, the functionality of different input types, and the importance of using the same name for radio buttons to limit selection.

Uploaded by

aboutalebfareeda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

English

The document provides an introduction to HTML forms, explaining how to create text boxes, password fields, and radio buttons for user input. It includes examples of HTML code for each input type and outlines true/false and multiple-choice questions to test understanding of the material. Key concepts include the purpose of forms, the functionality of different input types, and the importance of using the same name for radio buttons to limit selection.

Uploaded by

aboutalebfareeda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Revision

Introduction to HTML Forms

HTML forms allow users to enter and submit data on a webpage. We can add different input
fields like text boxes, password fields, and radio buttons to collect information.

Adding a Text Box

A text box lets users type information, such as their name. To add a text box in HTML, use:

<form>
Name: <input type="text">
</form>

This will create a box where users can type their name.

Adding a Password Field

A password field hides what users type by displaying dots (●) instead of actual letters to hide th
password. To add a password field, use:

<form>
Password: <input type="password">
</form>

This keeps passwords private when entered.

Adding a Radio Button

A radio button lets users choose only one option, such as selecting gender. To add radio
buttons, use:

<form>
Male: <input type="radio" name="gender">
Female: <input type="radio" name="gender">
</form>

Using the same name="gender" ensures only one option can be selected at a time.

Questions

True or False Questions

1. HTML forms allow users to enter and submit data on a webpage. (True)
2. A text box in HTML is used to display images. (False – It is used for typing text.)
3. A password field hides the text entered by showing dots (●). (True)
4. To create a text box in HTML, we use <input type="password">. (False – We use <input
type="text">.)
5. Radio buttons allow users to select multiple options at the same time. (False – They allow
selecting only one option.)
6. The <form> tag is used to create a form in HTML. (True)
7. Using the same name for radio buttons ensures that only one can be selected. (True)
8. A password field and a text box work the same way. (False – A password field hides the input,
while a text box shows it.)

Multiple Choice Questions

9. What does an HTML form do?


a) Shows pictures on a webpage
b) Collects and submits user input
c) Plays music
d) Changes text color
(Correct answer: b) Collects and submits user input
10. Which input type is used to create a text box?
a) <input type="password">
b) <input type="radio">
c) <input type="text">
d) <input type="submit">
(Correct answer: c) <input type="text">
11. What happens when a password is typed in a password field?
a) It appears as dots (●)
b) It becomes bold
c) It turns into numbers
d) It disappears
(Correct answer: a) It appears as dots (●)
12. Which input type is used for a password field?
a) <input type="text">
b) <input type="password">
c) <input type="radio">
d) <input type="checkbox">
(Correct answer: b) <input type="password">
13. What is the purpose of a radio button?
a) To allow selecting multiple options
b) To play sound on a webpage
c) To allow choosing only one option
d) To hide passwords
(Correct answer: c) To allow choosing only one option
14. How can you ensure that only one radio button is selected at a time?
a) Give them different name values
b) Give them the same name value
c) Add a password field
d) Use a text box instead
(Correct answer: b) Give them the same name value
15. Which HTML tag is used to create a form?
a) <button>
b) <input>
c) <form>
d) <password>
(Correct answer: c) <form>
16. Which input type is used to create a radio button?
a) <input type="text">
b) <input type="password">
c) <input type="radio">
d) <input type="submit">
(Correct answer: c) <input type="radio">

You might also like