Home > Web Front-end > JS Tutorial > 10 high-frequency HTML5 interview questions

10 high-frequency HTML5 interview questions

小云云
Release: 2017-11-18 16:22:36
Original
1904 people have browsed it

If you are learning HTML5, do you feel scared or nervous during the interview? As programmers, we will always encounter interview questions during the interview. Of course, HTML5 also has interview questions, so the editor has summarized them for you online. Here are 10 very common HTML5 interview questions. Friends who are preparing for interviews can pay attention. I hope these 10 HTML5 interview questions can help you.

1. What are the new HTML5 document types and character sets?

<!doctype html>
Copy after login

HTML5 UTF-8 encoding example:

<meta charset=”UTF-8″>
Copy after login

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 web page:

<audio controls>
<source src=”jamshed.mp3″ type=”audio/mpeg”>
Your browser does’nt support audio embedding feature. 
</audio>
Copy after login

3. How to embed video in HTML5?

Similar to audio, HTML5 supports videos in MP4, WebM and Ogg formats. The following is a simple example:

<video width=”450″ height=”340″ controls>
<source src=”jamshed.mp4″ type=”video/mp4″>
Your browser does’nt support video embedding feature.
</video>
Copy after login

4. In addition to audio and video, what other media tags does HTML5 have?

HTML5 provides strong support for multimedia. In addition to the audio and video tags, it also supports the following tags:

tag defines embedded content, such as plug-ins.

<embed type=”video/quicktime” src=”Fishing.mov”>
Copy after login

Useful for defining multiple data sources. The

<video width=”450″ height=”340″ controls>
<source src=”jamshed.mp4″ type=”video/mp4″>
<source src=”jamshed.ogg” type=”video/ogg”>
</video>
Copy after login

tag specifies an external text track for media such as a video element. Used to specify subtitle files or other files containing text that are visible when the media is played.

<video width=”450″ height=”340″ controls>
<source src=”jamshed.mp4″ type=”video/mp4″>
<source src=”jamshed.ogg” type=”video/ogg”>
<track kind=”subtitles” label=”English” src=”jamshed_en.vtt” srclang=”en” default></track>
<track kind=”subtitles” label=”Arabic” src=”jamshed_ar.vtt” srclang=”ar”></track>
</video>
Copy after login

5. What is the use of the HTML5 Canvas element?

The Canvas element is used to draw graphics on web pages. The power of this element tag is that it can directly perform graphic operations on HTML.

<canvas id=”canvas1″ width=”300″ height=”100″></canvas>
Copy after login

6. What is the difference between HTML5 storage types?

HTML5 can store data locally, which was previously used using cookies. HTML5 provides the following two local storage solutions:

localStorage is used for persistent local storage. The data will never expire and will not be lost when the browser is closed. sessionStorage can only be accessed by pages in the same session and the data is destroyed when the session ends. Therefore sessionStorage is not a persistent local storage, only session-level storage.

7. What are the new form elements in HTML5?

HTML5 adds many new form elements to allow developers to build better web applications.

datalist
datetime
output
keygen
date
month
week
time
color
number
range
email
url

8. Which HTML4 tags have been abandoned by HTML5?

HTML5 discards some outdated and unreasonable HTML tags:

frame
frameset
noframe
applet
big
center
basefront

9. What new APIs does the HTML5 standard provide?

The application 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

10. What is the difference between HTML5 application cache and browser cache?

Application caching is one of the important features of HTML5, which provides offline use capabilities so that applications can obtain local website content, such as HTML, CSS, images, and JavaScript. This feature can improve website performance. It is implemented with the help of manifest files, as follows:

<!doctype html>

......
Copy after login

Compared with traditional browser caching, it does not force the website content visited by users to be cached.

The above 10 HTML5 interview questions seem very simple, but they are often asked during interviews. Friends who are preparing for interviews hope that these 10 questions can help you.

Related recommendations:

Share some examples of front-end interview questions

Share front-end interview questions? How many can you get right?

The latest Baidu front-end interview questions sharing

Summary of written test questions in php interview questions

The 10 most error-prone PHP interview questions

Common PHP interview questions and answering techniques in 2017

Some questions about PHP Interview question analysis

The above is the detailed content of 10 high-frequency HTML5 interview questions. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template