Questions and Answers
What does 'text' define in HTML forms?
Normal text input
What does 'radio' define in HTML forms?
Radio button input for selecting one of many choices
What does 'submit' define in HTML forms?
A submit button for submitting the form
What does 'accept-charset' specify in HTML forms?
Signup and view all the answers
What does 'action' specify in an HTML form?
Signup and view all the answers
What does 'autocomplete' specify in an HTML form?
Signup and view all the answers
What does 'enctype' specify in an HTML form?
Signup and view all the answers
What does 'method' specify in an HTML form?
Signup and view all the answers
What does 'name' specify in an HTML form?
Signup and view all the answers
What does 'novalidate' specify in an HTML form?
Signup and view all the answers
What does 'target' specify in an HTML form?
Signup and view all the answers
What does 'form' define in HTML?
Signup and view all the answers
What does 'input' define in HTML?
Signup and view all the answers
What does 'textarea' define in HTML?
Signup and view all the answers
What does 'label' define for an input element in HTML?
Signup and view all the answers
What does 'fieldset' define in HTML?
Signup and view all the answers
What does 'figcaption' define in HTML?
Signup and view all the answers
What does 'select' define in HTML?
Signup and view all the answers
What does 'optgroup' define in HTML?
Signup and view all the answers
What does 'option' define in HTML?
Signup and view all the answers
What does 'button' define in HTML?
Signup and view all the answers
What does 'datalist' specify in HTML?
Signup and view all the answers
What does 'keygen' define in HTML?
Signup and view all the answers
What does 'output' define in HTML?
Signup and view all the answers
What does 'disabled' specify in an HTML form?
Signup and view all the answers
What does 'max' specify for an input field in HTML?
Signup and view all the answers
What does 'maxlength' specify for an input field in HTML?
Signup and view all the answers
What does 'min' specify for an input field in HTML?
Signup and view all the answers
What does 'pattern' specify for an input field in HTML?
Signup and view all the answers
What does 'readonly' specify for an input field in HTML?
Signup and view all the answers
What does 'required' specify for an input field in HTML?
Signup and view all the answers
What does 'size' specify for an input field in HTML?
Signup and view all the answers
What does 'step' specify for an input field in HTML?
Signup and view all the answers
What does 'value' specify for an input field in HTML?
Signup and view all the answers
What does the autocomplete attribute specify in a form?
Signup and view all the answers
What does the novalidate attribute specify for a form?
Signup and view all the answers
What does the autofocus attribute specify for an element?
Signup and view all the answers
What does the form attribute specify for an element?
Signup and view all the answers
What does the formaction attribute specify?
Signup and view all the answers
What does the formenctype attribute specify?
Signup and view all the answers
Study Notes
HTML Form Elements and Attributes
-
Text
- Represents a normal text input area for user data.
-
Radio
- Allows selection of one option from a set of multiple choices.
-
Submit
- Initiates form submission to the server.
-
Accept-Charset
- Designates the character encoding for submitted form data, defaulting to the page's charset.
-
Action
- Specifies the URL endpoint for form submission, defaulting to the current page.
-
Autocomplete
- Controls browser behavior for recommending previously entered values, with a default value of "on".
-
Enctype
- Determines data encoding type for submitted forms, defaulting to URL encoding.
-
Method
- Indicates the HTTP method (GET or POST) for form submission, defaulting to GET.
-
Name
- Provides a unique identifier for the form, enabling DOM access via
document.forms.name
.
- Provides a unique identifier for the form, enabling DOM access via
-
Novalidate
- Instructs the browser to skip validation checks when submitting a form.
-
Target
- Defines the window or frame where the response from the form submission will be displayed, defaulting to self.
-
Form
- Creates a structured element for collecting user input.
-
Input Control
- Represents a basic input component for user interaction.
-
Text Area
- Provides a multiline input region for larger amounts of text.
-
Label
- Associates a label with a specific input element, enhancing accessibility.
-
Fieldset
- Groups related elements within a form for organization.
-
Legend
- Assigns a caption or title to a fieldset for clarity.
-
Select
- Implements a drop-down list for user selections.
-
Optgroup
- Organizes a group of related options within a drop-down list.
-
Option
- Represents an individual selectable item within a drop-down list.
-
Button
- Defines a clickable button that can trigger actions.
-
Datalist
- Specifies a list of predefined options for input fields.
-
Keygen
- Generates a key-pair field for cryptographic purposes within forms.
-
Output
- Displays the result of a calculation or user interaction.
-
Disabled
- Marks an input field as unresponsive to user interaction.
-
Max
- Sets an upper limit on the value for an input field.
-
Maxlength
- Limits the number of characters allowed in an input field.
-
Min
- Establishes a lower limit on the value for an input field.
-
Pattern
- Uses a regular expression to validate input values.
-
Readonly
- Restricts an input field to only display data without allowing changes.
-
Required
- Indicates that an input field must be filled out before submission.
-
Size
- Determines the visual width of the input field in terms of character count.
-
Step
- Specifies intervals for valid input values.
-
Value
- Sets a default value displayed in the input field prior to user input.
Special Attributes in HTML Forms
-
Autocomplete Attribute
- Defines whether the input field allows browser-stored suggestions for auto-filling.
-
Novalidate Attribute
- Prevents form validation when submitting, allowing for submission of all input states.
-
Autofocus Attribute
- Ensures that a specified input field automatically receives focus when the page loads.
-
Form Attribute
- Links an input element to one or more forms, useful for components like buttons that control multiple forms.
-
Formaction Attribute
- Overrides the action URL specifically for elements of type "submit" and "image" for submission handling.
-
Formenctype Attribute
- Customizes data encoding during form submission, particularly useful for POST requests, overriding general enctype settings.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of HTML form elements with these flashcards. Each card focuses on a specific term related to HTML forms, including text inputs, radio buttons, and submit actions. Perfect for beginners looking to strengthen their understanding of web forms.