Unit 3.1 Forms Flashcards
Creating Interactive Forms
Forms can be nested inside other forms TRUE or FALSE
FALSE
Define the “action” attribute (forms)
The “action” attribute specifies the web address of a program that processes the information submitted via form
Define the “method” attribute
The “method” attribute specifies the HTTP method that the browser should use to submit the form
Define the “form” element
The “form” element represents a document section containing interactive controls for submitting information
Define the “input” element and the two main attributes used
The “input” element is a self-closing tag that creates many different types of form controls. The “type” attribute specifies what kind of form control is to be rendered. The “name” attribute is submitted with form data so that the server-side code can parse the information.
Define “textarea” element
The “textarea” element accepts multiple lines of text from the user. Most browers will render with widget to resize the box.
Define the “Button” element. What types do this element accept?
The “button” element will render a clickable button. The type’s it accepts are sumbit, reset and button.
Define “label” element
The “label” element helps organize forms by assigning text to a given form control. This text helps the user understand what kind of data they should add to each form. It also programmatically associates the label to a form control.
What does the “for” attribute do? (label)
When labeling, the “for” attribute assigns the given value to be associated with an id attribute that matches.
Define “fieldset” element
The “fieldset” element wraps multiple form elements into common groups. This helps organize a form and makes it easier for users to understand.
Define “legend” element
Similar to the label element, but instead of labeling a form control this labels a field set. Provides helpful context for users filling out a form.
Define “span” element
The “span” element is a generic container with no particular meaning. Commonly used to style in conjunction with class and style attributes. This is also a inline level element.
Define “select” element
The select element renders a drop-down menu that contains selectable options. This type of form control is ideal for scenarios where the user must choose one option from a preset list of 5 or more choices.
Define “option” element
The option element represents one of the choices that a user can choose in a select menu. It should always be nested inside of a select element.
Define “optgroup” element
The optgroup element wraps one or more option elements and helps to create logical groups. The label attribute specifies the text that the optgroup should display above the nested options.