input types Flashcards
Which input types are available in HTML5 forms?
email, url, number, range, Date pickers, search and color
Which form input type will you use if you wish to take an email as input from the user?
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”/›
Name any three types of date picker.
a) month - selects month and year
b) week - selects week and year
c) time - selects time (hour and minute)
Which HTML5 input type will allow you to select color?
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” /›
What is the default video format for HTML5?
Ogg Theora is the default video format in HTML5.
How do you differentiate HTML5 and Flash when playing videos?
HTML5 has built-in support for audio and video codecs whereas Flash plugin has to load them which makes it slower than HTML5.
What does HTML5 use to access and store data?
HTML5 uses Javascript to access and store data.
Is there any time limit for the localstorage object’s data storage?
There is no time limit.
When does the session storage data get deleted?
As soon as the user closes the browser, the session storage data is removed or deleted.
What does datalist element do?
A list of options for an input field can be specified using datalist element.
What HTML5 element provides a secure way to authenticate users?
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›
Define private and public keygen elements.
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.
Where is the private key stored?
The private key is stored on the client and is never shared.
Where is the public key stored?
The public key is stored on the server.
What does a public key do?
The public key could be used to generate a client certificate to authenticate the user in the future.