HTML Forms Flashcards

1
Q

What is an <em>HTTP request</em>?

A

The thing that instructs the computer how to handle incoming information

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

What does the < form > element do?

A

Collects information

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

What attributes does the < form > element need?

A

action and method

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

What does the action attribute do?

A

determies where the information is sent

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

What does the method attribute do?

A

It is assigned an HTTP verb and is included in the HTTP request

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

How do you add a text box for typing on a form

A

With the < imput > element

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

What attributes does the < input > element need?

A

The type attribute, the value attribute and the name attribute

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

What does the type attribute do?

A

It tells the computer what type of information is coming in, typically you would write “text”?

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

What does the name attribute do

A

Helps the browser know what to do with the information, just write “first-text-field”

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

What does the value attribute do?

A

Puts text in the text box

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

What element is used to add a label to the textbox?

A

A < label > element

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

How does the < label > element know which text box to label?

A

By assigning the < label > element a for attribute, you can give the input element the id attribute and make them the same

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

How do you make a password forum?

A

Add the attribute type=”password”

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

How do you restrict the person to type only numbers?

A

By setting type to numbers

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

What does the step attribute do?

A

It makes up and down arrows in the text box which allows you to increase and decrease the numbers

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

How do you make a range imput?

A

By setting type to range, you also must include the min and max

17
Q

How do you make a checkbox?

A

Set type to checkbox

18
Q

What are Radio Button Inputs?

A

Inputs with only one answer, unlike check boxes where you can choose multiple. You make a radio button input by setting the type to radio

19
Q

How do you make a drop down list?

A

Use the select element with the id and name, and then add child option elements are write the name inside them, remember to also set to value to that name

20
Q

What is a datalist?

A

A data list is like a drop down list but users can type into it

21
Q

How do you make a datalist?

A

Use the input element, and add the attribute “list” and set it to the id of the data list and set the type attribute to text. Then add children elements to the data list element and those will show

22
Q

How do you change the size of a textarea box?

A

With the rows and cols attributes

23
Q

How do you add a value to the textarea box?

A

By putting it in between the opening and closing tabs.