HTML Forms Flashcards

1
Q
  • One of the most used form element
  • can be displayed in several ways,
    depending on the type attribute
A

input element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • defines drop-down list
A

select element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • defines an option that can be
    selected in <select> element</select>
A

option element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

attribute that allows the user to select more than one value in <select> element</select>

A

multiple attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • defines a multi-line input field
A

textarea element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

attribute that specifies the visible width of a text area.

A

cols attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

attribute that specifies the visible number of lines in a text area.

A

rows attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • defines a clickable button
  • Always specify the type attribute
A

button element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What will happen when you click this button?:
button type=”button” onclick=”alert(‘Hello World!’)”>
Click Me!</button

A

After clicking the button a message box will appear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

used to group related data in a
form.

A

fieldset element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

defines a caption for the <fieldset>
element.

A

legend element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • 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
A

datalist element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

defines a single-line text input field

A

input type=”text”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

defines password field

A

input type=”password”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • defines button for sumitting form data to a form-handler
A

input type=”submit”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

typically a server page with a script for processing input data

A

form-handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

defines a reset button that will reset all form values to their default values

A

input type=”reset”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

TRUE OR FALSE:
Radio buttons let a user select ONLY ONE
of a limited number of choices:

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  • defines a radio button
  • the name of the elements must be the same
A

input type=”radio”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  • defines a checkbox
A

input type=”checkbox”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

lets a user select zero or more options of a limted number of choices

A

Checkbox

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

defines a button

A

input type=”button”

22
Q

used for input fields that should contain a color

A

input type=”color”

23
Q

used for input fields that should contain a date

A

input type=”date”

24
Can you add min and max attributes to add restrictions to dates?
Yes
25
specifies a date and time input field with no timezone
input type="datetime-local"
26
used for input fields that should contain an e-mail address
input type="email"
27
allows the user to select a month and year
input type="month"
28
defines a file-select field and a "browse" button for file-upload
input type="file"
29
- defines a numeric input field - set restrictions on what numbers are accepted
input type="number"
30
defines a control for entering a number whose exact value is not important (slider)
input type="range"
31
default range of input type range
0 to 100
32
used for search fields
input type="search"
33
used for input fields that should contain a telephone number
input type="tel"
34
allows the user to select a time
input type="time"
35
used for input fields that should contain a url address
input type="url"
36
allows the user to select a week and year
input type="week"
37
attribute that specifies an initial value for an input field:
value attribute
38
specifies that an input field is read-only.
readonly attribute
39
cannot be modified (however, a user can tab to it, highlight it, and copy the text from it).
readonly input field
40
- specifies that an input field should be disabled. - unusable and unclickable - value of a disabled input field will not be sent when submitting the form
disabled
41
- specifies the visible width, in characters, of an input field. - default value is 20
size attribute
42
input types that the size attribute works with
- text - search - tel - url - email - password
43
specifies the maximum number of characters allowed in an input field.
maxlength
44
specify the minimum and maximum values for an input field
min and max attributes
45
specifies a regular expression that the input field's value is checked against, when the form is submitted.
pattern attribute
46
specifies short a hint that describes the expected value of an input field (a sample value or a short description of the expected format).
placeholder attribute
47
specifies that an input field must be filled out before submitting the form.
required attribute
48
specifies the legal number intervals for an input field.
step
49
specifies that an input field should automatically get focus when the page loads
autofocus attribute
50
specify the height and width of an element.
height and width attribute
51
specifies whether a form or an input field should have autocomplete on or off.
autocomplete attribute
52
allows the browser to predict the value. When a user starts to type in a field, the browser should display options to fill in the field, based on earlier typed values.
autocomplete attribute