10 common questions in HTML5 interview

Source: Internet
Author: User
Tags browser cache sessionstorage

10 common Questions in HTML5 interview


1. What is the new HTML5 document type and character set?
The HTML5 document type is simple: <!doctype html>

HTML5 Using UTF-8 encoding example:<meta charset= "utf-8″>
2. What HTML4 tags are HTML5 discarded?
HTML5 discarded some outdated, unreasonable HTML tags:
  • Frame
  • Frameset
  • Noframe
  • Applet
  • Big
  • Center
  • Basefront
3, HTML5 What are the new form elements?
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
4. 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
5. 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>
6, 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>
7. 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>
8. 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>
9, HTML5 storage types?
HTML5 can store data locally, It was used in the past with 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
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.

10 common questions in HTML5 interview

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.