10 most common HTML5 questions and answers

Source: Internet
Author: User
Tags sessionstorage

This is the choice of 10 HTML5 interview questions and gives the answer. This is the most common interview problem for WEB developers, and I'm sure you will find your understanding improved after you have mastered these important interview questions. Let's take a look.

Related articles that may be of interest to you
    • Web front-end developers and designers must read the essence of the article recommended
    • Carefully selected excellent jquery Ajax page plug-ins and tutorials
    • 12 Amazing ideas for 404 error page Design
    • Let the website Move! 12 Excellent jQuery animation plugins
    • 8 Cutting-Edge HTML5 & CSS3 effects "with source download"

1. What is the new HTML5 document type and character set?

The HTML5 document type is simple:

<!doctype html>

HTML5 using the UTF-8 encoding example:

<meta charset= "utf-8″>
2. How to embed audio in HTML5?

HTML5 supports MP3, Wav, and OGG-formatted audio, here's 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>
3, how to embed video in HTML5?

Like audio,HTML5 supports videos in MP4, WebM, and OGG formats, and here's 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>
4. What media labels are available in addition to audio and VIDEO,HTML5?

HTML5 provides strong support for multimedia, with the following tags supported in addition to audio and video tags:

<embed> tags define embedded content, such as plugins.

<embed type= "Video/quicktime" src= "Fishing.mov" >

<source> is useful for defining multiple data sources.

<video width= "450″height=" 340″controls>     <source src= "jamshed.mp4″type=" video/mp4″>     < SOURCE src= "Jamshed.ogg" type= "Video/ogg" ></video>

<track> tags Specify external text tracks for media such as video elements. Used to specify subtitle files or other files containing text that are visible when the media is playing.

<video width= "450″height=" 340″controls>     <source src= "jamshed.mp4″type=" video/mp4″>     < SOURCE src= "Jamshed.ogg" type= "Video/ogg" >     <track kind= "Subtitles" label= "中文版" src= "JAMSHED_EN.VTT" Srclang= "en" default></track>      <track kind= "Subtitles" label= "Arabic" src= "JAMSHED_AR.VTT" srclang= " Ar "></track></video>
5. What is the use of HTML5 Canvas elements?

The Canvas element is used to draw a graphic on a Web page, and the element tag is powerful in that it can be graphically manipulated directly on HTML .

<canvas id= "canvas1″width=" 300″height= "100″></canvas>
    • The incredible HTML5 Canvas application test
    • 18 chart libraries based on the HTML5 Canvas
    • 20 stunning HTML5 Canvas application trials
    • 16 web games developed by HTML5 Canvas
    • 14 Powerful HTML5 sketches and drawing tools are recommended
6. What is the difference between HTML5 storage types?

HTML5 is able to store data locally, before using cookies. HTML5 provides the following two local storage scenarios:

    • localstorage is used for persistent local storage, the data never expires, and the browser is not lost.
    • sessionstorage pages in the same session can be accessed and the data is destroyed when the session ends. So sessionstorage is not a persistent local store, it's just session-level storage
7. What are the new form elements in HTML5?

HTML5 has added a number of form elements that allow developers to build better Web applications.

    • DataList
    • Datetime
    • Output
    • Keygen
    • Date
    • Month
    • Week
    • Time
    • Color
    • Number
    • Range
    • Email
    • Url
8. What HTML4 tags are HTML5 discarded?

HTML5 discarded some outdated, 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 are mainly:

    • 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 , providing offline use, allowing applications to get local content such as HTML, CSS, pictures, and JavaScript. This feature can improve the performance of the site, its implementation with the help of the manifest file, as follows:

<!doctype html>

It does not force user access to site content to be cached compared to traditional browser caches.

Related articles that may be of interest to you
    • The long-awaited 2013 best JQuery plugin announced
    • The little friends are stunned! 8 Stunning Web effects
    • 10 popular Metro UI style Bootstrap Themes
    • Recommended 35 exquisite CSS3 and HTML5 Web templates
    • Featured 12 excellent jQuery Ajax pagination plugins and tutorials

This article link: Select 9 cool HTML5 effect "with source download"

Compilation Source: Dream Sky focus on front-end development technology sharing web design resources

This article comes from "Dream Sky (http://www.cnblogs.com/lhb25/)"

10 most common HTML5 questions and answers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.