Using Attributes Flashcards

1
Q

How to add 200 width and 130 height to an image?

A

<imgsrc=”URL” width=”200” height=”130”>

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

How to add text to an image?

A

<imgsrc=”URL” desc=”description”>

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

Tag used to create links inside of pages.

A

<nav>
</nav>

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

Add 3 pages to a page: Home, About, Contact

A

<nav>
<ahref="index.html">Home</a>
<ahref="about.html">About</a>
<ahref="contact.html">Contact</a>
</nav>

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

How to add different sections to a single page?

A

<nav>
<ahref="#s1">s1</a>
<ahref="#s2">s2</a>
</nav>

<pid=”s1”>s1</p>
<pid=”s2”>s2</p>

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

3 types of form

A

Text, radio, checkbox

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

Tag for forms

A

<form>
</form>

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

Tag for labels in forms

A

<labelfor=”id”>Name</label>

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

Tag used for inputs

A

<inputtype=”checkbox” id=”for”>

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

Form: Notification preferences
Choice: Email, Push (after the input space)

A

<form>
<inputtype="checkbox" id="box1">
<labelfor="box1">Email</label>
<inputtype="checkbox" id="box2">
<labelfor="box2">Email</label>
</form>

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

Attributes for labels

A

for

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

Attributes for inputs

A

id

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

Add text input

A

<form>
<inputtype="text">
</form>

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

Create a form for one-choice survey.

A

<form>
<inputtype="radio">
</form>

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

Create a form for checkboxes.

A

<form>
<inputtype="checkbox">
</form>

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

Create “Submit” button.

A

<form>
<inputtype="submit">
</form>

17
Q

Attribute used to send a name instead of an id to the database.

A

value=””

18
Q

Where to put the information in a form?

A

Name

19
Q

What information to put?

A

Value

20
Q

For the case of text inputs, you can use the value attribute to define a _____________ that will be submitted unless a different value is provided by the user.

A

default value

21
Q

Tag used for options.

A

<option></option>

22
Q

Create a form with 3 options with”Opt 2” as a pre-selected option.

A

<form>
<selectname="Opt">
<optionvalue="1">Opt 1</option>
<optionvalue="2">Opt 2</option>
<optionvalue="3" selected>Opt 3</option>
</select>
<inputtype="submit">
</form>

23
Q

In a drop-down menu, where do we put the name attribute?

A

<select></select>

24
Q

In a drop-down menu, where do we put the value attribute?

A

<option></option>

25
Q

How to pre-select an option?

A

You use the “selected” attribute.

26
Q

Create a drop down menu.

A

<form>
<labelfor="dropdown">Size</label>
<select>
<optionid="1">1</option>
<optionid="2">2</option>
<optionid="3">3</option>
<optionid="4" selected>4</option>
</select>
</form>