HTML Forms Flashcards
What is an <em>HTTP request</em>?
The thing that instructs the computer how to handle incoming information
What does the < form > element do?
Collects information
What attributes does the < form > element need?
action and method
What does the action attribute do?
determies where the information is sent
What does the method attribute do?
It is assigned an HTTP verb and is included in the HTTP request
How do you add a text box for typing on a form
With the < imput > element
What attributes does the < input > element need?
The type attribute, the value attribute and the name attribute
What does the type attribute do?
It tells the computer what type of information is coming in, typically you would write “text”?
What does the name attribute do
Helps the browser know what to do with the information, just write “first-text-field”
What does the value attribute do?
Puts text in the text box
What element is used to add a label to the textbox?
A < label > element
How does the < label > element know which text box to label?
By assigning the < label > element a for attribute, you can give the input element the id attribute and make them the same
How do you make a password forum?
Add the attribute type=”password”
How do you restrict the person to type only numbers?
By setting type to numbers
What does the step attribute do?
It makes up and down arrows in the text box which allows you to increase and decrease the numbers