HTML Forms Flashcards
- One of the most used form element
- can be displayed in several ways,
depending on the type attribute
input element
- defines drop-down list
select element
- defines an option that can be
selected in <select> element</select>
option element
attribute that allows the user to select more than one value in <select> element</select>
multiple attribute
- defines a multi-line input field
textarea element
attribute that specifies the visible width of a text area.
cols attribute
attribute that specifies the visible number of lines in a text area.
rows attribute
- defines a clickable button
- Always specify the type attribute
button element
What will happen when you click this button?:
button type=”button” onclick=”alert(‘Hello World!’)”>
Click Me!</button
After clicking the button a message box will appear
used to group related data in a
form.
fieldset element
defines a caption for the <fieldset>
element.
legend element
- specifies a list of pre-defined options
for an input element. - Users will see a drop-down list of the pre-defined options as they input data
datalist element
defines a single-line text input field
input type=”text”
defines password field
input type=”password”
- defines button for sumitting form data to a form-handler
input type=”submit”
typically a server page with a script for processing input data
form-handler
defines a reset button that will reset all form values to their default values
input type=”reset”
TRUE OR FALSE:
Radio buttons let a user select ONLY ONE
of a limited number of choices:
TRUE
- defines a radio button
- the name of the elements must be the same
input type=”radio”
- defines a checkbox
input type=”checkbox”
lets a user select zero or more options of a limted number of choices
Checkbox