10 most common HTML5 interview questions with answers, html5 interview questions with answers
This article shares the 10 most common HTML5 interview questions.
Question 1: What is the new HTML5 document type and character set?
A: HTML5 document type is simple: HTML5 uses UTF-8 encoding.
Question 2: How to embed audio in HTML5?
A: HTML5 supports audio in MP3, Wav, and Ogg formats. The following figure shows how to embed audio into webpages.
Question 3: how to embed videos in HTML5?
A: Like audio, HTML5 supports MP4, WebM, and Ogg videos.
Question 4: In addition to audio and video, what media tags does HTML5 have?
A: HTML5 provides strong support for multimedia. In addition to audio and video 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.
Question 5: what is the use of the HTML5 Canvas Element?
A: The Canvas element is used to draw images on webpages. The canvas Element of HTML5 uses JavaScript to draw images on webpages.
Question 6: What are the differences between HTML5 Storage types?
A: HTML5 can store data locally. Previously, cookies were used. HTML5 provides the following two local storage solutions: localStorage is used for persistent local storage, data will never expire, and close 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.
Question 7: What new form elements does HTML5 have?
A: HTML5 adds many new form elements for developers to build better Web applications. Datalist datetime output keygen date month week time color number range email url.
Question 8: Which HTML4 labels are discarded by HTML5?
HTML5 discards some outdated and unreasonable HTML tags: frame frameset noframe applet big center basefront.
Question 9. What new APIs does HTML5 provide?
A: The app APIs provided by HTML5 mainly include Media API Text Track API Application Cache API User Interaction Data Transfer API Command API Constraint Validation API History API.
Question 10: What is the difference between HTML5 application cache and browser cache?
A: Application cache is one of the important features of HTML5. It provides offline functions so that applications can obtain local website content, such as HTML, CSS, images, and JavaScript. This feature can improve website performance, and its implementation relies on manifest files.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.