input types Flashcards

1
Q

Which input types are available in HTML5 forms?

A

email, url, number, range, Date pickers, search and color

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

Which form input type will you use if you wish to take an email as input from the user?

A

HTML5 form provides input field of type ‘email’ that can be used to take email address as input. The benefit is that email validation is done automatically.
e.g. ‹input type=”email” name=”email”/›

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

Name any three types of date picker.

A

a) month - selects month and year
b) week - selects week and year
c) time - selects time (hour and minute)

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

Which HTML5 input type will allow you to select color?

A

Color type can be used to get color input from the user. The user experience may vary depending upon the browser.
e.g. Select color: ‹input type=”color” name=”user_color” /›

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

What is the default video format for HTML5?

A

Ogg Theora is the default video format in HTML5.

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

How do you differentiate HTML5 and Flash when playing videos?

A

HTML5 has built-in support for audio and video codecs whereas Flash plugin has to load them which makes it slower than HTML5.

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

What does HTML5 use to access and store data?

A

HTML5 uses Javascript to access and store data.

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

Is there any time limit for the localstorage object’s data storage?

A

There is no time limit.

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

When does the session storage data get deleted?

A

As soon as the user closes the browser, the session storage data is removed or deleted.

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

What does datalist element do?

A

A list of options for an input field can be specified using datalist element.

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

What HTML5 element provides a secure way to authenticate users?

A
The keygen element.
e.g.
‹form action="page.asp" method="get"› Username: ‹input type="text" name="location" /› Encryption: ‹keygen name="security" /›
‹input type="submit" /›
‹/form›
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define private and public keygen elements.

A

The keygen element is a key-pair generator and when a form is submitted, public key and private key are generated. Private key is used for encrypting the data and public key is used for decrypting the data.

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

Where is the private key stored?

A

The private key is stored on the client and is never shared.

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

Where is the public key stored?

A

The public key is stored on the server.

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

What does a public key do?

A

The public key could be used to generate a client certificate to authenticate the user in the future.

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

Which element is used for calculations and script output?

A
The output element
e.g.
‹input name="n1" type="number"› +
‹input name="n2" type="number"› =
‹output name="result"
onforminput="value=n1.valueAsNumber + n2.valueAsNumber"›‹/output›
17
Q

Write the syntax of output element.

A

‹output id=”result” onforminput=”resCalc()”›‹/output›