10 HTML5 interview questions and answers are selected. This is the most common interview question for Web developers. After you have mastered these important interview questions, you will surely feel that your understanding has improved. Let's take a look ....,. 10 HTML5 interview questions and answers are selected. This is the most common interview question for Web developers. After you have mastered these important interview questions, you will surely feel that your understanding has improved. Let's take a look.
1. What is the new HTML5 document type and character set?
HTML5 document type is simple:
HTML5 uses UTF-8 encoding example:
2. How to embed audio in HTML5?
HTML5 supports audio in MP3, Wav, and Ogg formats. The following is a simple example of embedding audio in a webpage:
3. How to embed videos in HTML5?
- Your browser does 'nt support audio embedding feature.
Similar to audio, HTML5 supports MP4, WebM, and Ogg videos. The following is a simple example:
4. In addition to audio and video, what media tags does HTML5 have?
- Your browser does 'nt support video embedding feature.
HTML5 provides strong support for multimedia. In addition to audio and video tags, it also supports the following tags:
Tags define embedded content, such as plug-ins.
It is useful for defining multiple data sources.
Labels define external text tracks for media such as video elements. It is used to specify subtitle files or other files containing text that are visible during media playback.
5. What is the use of HTML5 Canvas elements?
The Canvas element is used to draw images on a web page. The element tag is powerful in that it can be used to perform graphic operations directly on HTML,
6. What are the differences between HTML5 Storage types?
HTML5 can store data locally. Previously, cookies were used. HTML5 provides the following two local storage solutions:
7. What new form elements does HTML5 have?
- LocalStorage is used for persistent local storage. The data will never expire and the browser will not be lost.
- SessionStorage can only access pages in the same session and the data will be destroyed after the session ends. SessionStorage is not a persistent local storage, but a session-level storage.
HTML5 adds many new form elements for developers to build better Web applications.
8. What HTML 4 labels does HTML5 discard?
HTML5 discards outdated and unreasonable HTML tags:
9. What new APIs does HTML5 provide?
HTML5 provides the following application APIs:
10. What is the difference between HTML5 application cache and browser cache?
- Media API
- Text Track API
- Application Cache API
- User Interaction
- Data Transfer API
- Command API
- Constraint Validation API
- History API
Compared with the traditional browser cache, it does not force users to access the website content to be cached.