HTML Tables and Forms Flashcards
What is the form element used for?
Used to create an HTML form for user input.
What does the action attribute specify in an HTML form?
Specifies the URL where the form data should be sent.
What are the two most common HTTP methods specified by the method attribute?
- GET
- POST
Fill in the blank: The _______ element is used to create an input field for user input.
input
What does the type attribute specify in the input element?
Specifies the type of input field.
What is the purpose of the placeholder attribute in an input field?
Shows a hint to the user to indicate what to enter.
What does the value attribute do in an input element?
Specifies the value of the input.
What is the use of the size attribute in an input field?
Defines the number of characters that should be visible.
What does the min attribute specify in number input types?
Specifies the minimum value allowed.
What does the max attribute specify in number input types?
Specifies the maximum value allowed.
What is the purpose of the minlength attribute?
Specifies the minimum number of characters required.
What does the maxlength attribute do in an input field?
Specifies the maximum number of characters allowed.
What is the function of the required attribute in an input field?
Specifies that the input field must be filled out before submitting the form.
What does the disabled attribute do in an input element?
Specifies that an input field should be disabled.
What is the purpose of the readonly attribute in an input field?
Specifies that an input field is read-only.
What is the label element used for in HTML forms?
Used to create a label for an input field.
What attribute of the label element is used to specify which input field it is associated with?
for
What does the button element create?
Creates a clickable button.
What are the three types of buttons defined by the type attribute?
- submit
- reset
- button
What is the fieldset element used for?
Used to group related inputs together.
What does the legend element do?
Adds a caption to describe the group of inputs.
What is the focused state of an input field?
The state of an input field when it is selected by the user.
What is the table element used for?
Used to create an HTML table.
What element is used to group the header content in an HTML table?
Table Head (thead)