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
Q

Can you add min and max attributes to add restrictions to dates?

A

Yes

25
Q

specifies a date and time input field with no timezone

A

input type=”datetime-local”

26
Q

used for input fields that should contain an e-mail address

A

input type=”email”

27
Q

allows the user to select a month and year

A

input type=”month”

28
Q

defines a file-select field and a “browse” button for file-upload

A

input type=”file”

29
Q
  • defines a numeric input field
  • set restrictions on what numbers are accepted
A

input type=”number”

30
Q

defines a control for entering a number whose exact value is not important (slider)

A

input type=”range”

31
Q

default range of input type range

A

0 to 100

32
Q

used for search fields

A

input type=”search”

33
Q

used for input fields that should contain a telephone number

A

input type=”tel”

34
Q

allows the user to select a time

A

input type=”time”

35
Q

used for input fields that should contain a url address

A

input type=”url”

36
Q

allows the user to select a week and year

A

input type=”week”

37
Q

attribute that specifies an initial value for an input field:

A

value attribute

38
Q

specifies that an input field is read-only.

A

readonly attribute

39
Q

cannot be modified (however, a user can tab to it, highlight it, and copy the text from it).

A

readonly input field

40
Q
  • 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
A

disabled

41
Q
  • specifies the visible width, in characters, of an input field.
  • default value is 20
A

size attribute

42
Q

input types that the size attribute works with

A
  • text
  • search
  • tel
  • url
  • email
  • password
43
Q

specifies the maximum number
of characters allowed in an input field.

A

maxlength

44
Q

specify the minimum and maximum values for an input field

A

min and max attributes

45
Q

specifies a regular expression that the input field’s value is checked against, when the form is submitted.

A

pattern attribute

46
Q

specifies short a hint that describes the expected value of an input field (a sample value or a short description of the expected format).

A

placeholder attribute

47
Q

specifies that an input field must be filled out before submitting the form.

A

required attribute

48
Q

specifies the legal number intervals
for an input field.

A

step

49
Q

specifies that an input field should automatically get focus when the page loads

A

autofocus attribute

50
Q

specify the height and width of an <input></input> element.

A

height and width attribute

51
Q

specifies whether a form or an input field should have autocomplete on or off.

A

autocomplete attribute

52
Q

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.

A

autocomplete attribute