Friday 30 January 2015

HTML5 and CSS3 Interview Questions and Answers (Part4)

16. What are the audio tags provided by HTML 5?
HTML 5 provides following audio tags:
<audio> - Defines sound content
<source> - Defines multiple media resources for media elements, such as <video> and <audio>

17. What are the new input types provided by HTML 5 for forms?
Following are the important, new input types for forms provided by HTML 5:
- color – used for fields that should contain colour.
- date – allows the user to select a date
- datetime - allows the user to select a date and time (with time zone)
- datetime-local - allows the user to select a date and time (without time zone)
- email - used for input fields that should contain an e-mail address
- month - allows the user to select a month and year.
- number - used for input fields that should contain a numeric value. Restrictions on type of numbers accepted can be set.
- range - used for input fields that should contain a value from a range of numbers. Restrictions on type of numbers accepted can be set here as well.
- search - used for search fields
- tel - defines a field for entering a telephone number
- time - allows the user to select a time
- url - used for input fields that should contain a URL address
- week - allows the user to select a week and year

18. What is HTML5 Web Storage?
With HTML5, it is possible for the web pages to store the data locally in the user's browser. This web storage is much faster and secured than the cookies. Also, a larger amount of data can be stored without causing any adverse effect to the performance of the website.

The data here is not included with every server request. It is used ONLY when it is asked for. It is only that particular web page that can access the data stored by itself.

19. Differentiate between localStorage and sessionStorage objects.
- localStorage object stores the data without an expiry date while sessionStorage object stores the data only for one session.
- With localStorage object, data will not be deleted when the browser window is closed while the data is deleted when the browser window closes with sessionStorage objects.

20. What is the concept of Application Cache in HTML5? What are its advantages?
The Application Cache concept introduced by HTML5 means that a web application is cached, and accessible without an internet connection.
There are three advantages of Application Cache:
1.Offline browsing - users can use the application when they're offline
2.Speed - cached resources load faster
3.Reduced server load - the browser will only download updated/changed resources from the server
More Questions & Answers :-
Part1  Part2  Part3  Part4  Part5  Part6  Part7  Part8  Part9  Part10

No comments:

Post a Comment