HTML5 Job Interview Questions and Answers
HTML5 Job Interview Questions and Answers
And Answers
If you find any question or answer is incorrect or incomplete then you can submit your question or
answer directly with out any registration or login at our website. You just need to visit HTML5
Interview Questions And Answers to add your answer click on the Submit Your Answer links on the
website; with each question to post your answer, if you want to ask any question then you will have a
link Submit Your Question; that's will add your question in HTML5 category. To ensure quality, each
submission is checked by our team, before it becomes live. This HTML5 Interview preparation PDF
was generated at Saturday 6th February, 2021
You can follow us on FaceBook for latest Jobs, Updates and other interviews material.
www.facebook.com/InterviewQuestionsAnswers.Org
If you need any further assistance or have queries regarding this document or its material or any of
other inquiry, please do not hesitate to contact us.
Best Of Luck.
Question - 1:
Explain the difference between HTML and HTML5
ue
Ans:
HTML5 is nothing more then upgraded version of HTML where in HTML5 Lot of new future like Video, Audio/mp3, date select function , placeholder , Canvas,
2D/3D Graphics, Local SQL Database added so that no need to do external plugin like Flash player or other library
st
Question - 2:
io
The <!DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. AND The <!DOCTYPE> tag does not have an end tag
and It is not case sensitive.
The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html> tag. As In HTML 4.01, all <! DOCTYPE > declarations require
a reference to a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not
based on SGML, and therefore does not require a reference to a Document Type Definition (DTD).
A
Question - 3:
Explain How many New Markup Elements you know in HTML5
Ans:
w
or other articles which can be distributed independently from the rest of the site.
<aside> For content aside from the content it is placed in. The aside content should
be related to the surrounding content
s.
<bdi> For text that should not be bound to the text-direction of its parent elements
<command> A button, or a radiobutton, or a checkbox
<details> For describing details about a document, or parts of a document
O
Question - 4:
Explain What are the New Media Elements in HTML5? is canvas element used in HTML5
Copyright © https://InterviewQuestionsAnswers.org Page 3/8
HTML5 Interview Questions And Answers
Ans:
Below are the New Media Elements have added in HTML5
Tag Description
<audio> For multimedia content, sounds, music or other audio streams
In
<video> For video content, such as a movie clip or other video streams
<source> For media resources for media elements, defined inside video or audio
elements
<embed> For embedded content, such as a plug-in
te
Question - 5:
ie
url a URL
email One or more email addresses
datetime A date and/or time
ue
date A date
month A month
week A week
time The input value is of type time
datetime-local A local date/time
st
number A number
range A number in a given range
color A hexadecimal color, like #82345c
io
placeholder Specifies a short hint that describes the expected value of an input field
View All Answers
ns
Question - 6:
Tell me How to add video and audio in HTML5
Ans:
A
The canvas element is used to draw graphics images on a web page by using javascript like below
Like below we can add video in html5
<video width="320" height="240" controls="controls">
ns
<audio controls="controls">
<source src="mysong.ogg" type="audio/ogg" />
<source src="mysong.mp3" type="audio/mpeg" />
er
</audio>
View All Answers
s.
Question - 7:
Explain What is the use of localStorage in HTML5?
O
Ans:
Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data, because they are passed on by every request to the server,
so it was very slow and in-effective.
R
In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to store large amounts of data without affecting the
website's performance.and The data is stored in different areas for different websites, and a website can only access data stored by itself.
G
And for creating localstores just need to call localStorage object like below we are storing name and address
<script type="text/javascript">
localStorage.name="PHPZAG";
document.write(localStorage.name);
</script>
<script type="text/javascript">
localStorage.address="Newyork USA";
document.write(localStorage.address);
</script>
View All Answers
Question - 8:
Do you know What is the sessionStorage Object in html5? How to create and access?
Ans:
The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a
sessionStorage here we created "name" as session
<script type="text/javascript">
sessionStorage.name="PHPZAG";
document.write(sessionStorage.name);
</script>
View All Answers
In
Question - 9:
Can you explain What the use of Canvas Element in HTML5?
te
Ans:
The canvas element is used to draw graphics images on a web page by using javascript like below
rv
var pcdsText=pcdsCanvas.getContext("2d");
pcdsText.fillStyle="#82345c";
pcdsText.fillRect(0,0,150,75);
w
</script>
View All Answers
Q
Question - 10:
Tell me What purpose does HTML5 serve?
ue
Ans:
HTML5 is the proposed next standard for HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. It aims to reduce the need for proprietary plug-in-based rich internet
application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX.
st
Question - 11:
io
What is the difference between HTMl5 Application cache and regular HTML browser cache?
Ans:
ns
HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is
connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that
have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site's performance, though you are of course
using bandwidth to download those files initially.
View All Answers
A
Question - 12:
ns
<audio controls="controls">
<source src="test.mp3" type="audio/mp3" />
</audio>
er
Question - 13:
s.
HTML5 offers two new objects for storing data on the client:
LocalStorage - stores data with no time limit
R
<script type="text/javascript">
localStorage.lastname="ZAG";
document.write(localStorage.lastname);
G
</script>
SessionStorage - stores data for one session.The data is deleted when the user closes the browser window.
<script type="text/javascript">
sessionStorage.lastname="ZAG";
document.write(sessionStorage.lastname);
</script>
View All Answers
Question - 14:
HOW DO YOU PLAY A VIDEO USING HTML5?
Ans:
We can display video using the tag as shown below:
<video width="320" height="240" controls="controls">
<source src="test.mp4" type="video/mp4" />
</video>
View All Answers
Question - 15:
Explain WHAT OTHER ADVANTAGES DOES HTML5 HAVE?
Ans:
In
a) Cleaner markup
b) Additional semantics of new elements like <header>, <nav>, and <time>
c) New form input types and attributes that will (and in Opera's case, do) take the hassle out of scripting forms.
te
Question - 16:
rv
Question - 17:
WHAT IS HTML5?
Q
Ans:
HTML5 is the latest version of HTML standard supporting multimedia and graphical content.
ue
View All Answers
Question - 18:
WHAT IS THE DIFFERENCE BETWEEN HTML5 APPLICATION CACHE AND REGULATE HTML BROWSER CACHE?
st
Ans:
The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is
io
connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that
have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site's performance, though you are of course
using bandwidth to download those files initially.
ns
Question - 19:
What other advantages does HTML5 have?
A
Ans:
* Cleaner markup
ns
Question - 20:
er
application (RIA) technologies such as Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX.
View All Answers
O
Question - 21:
What are the new APIs provided by the HTML 5 standard? Give a brief description of each
R
Ans:
G
* The canvas element: Canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a
full set of drawing functions similar to other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of the canvas include
building graphs, animations, games, and image composition.
* Timed media playback
* Offline storage database
* Document editing
* Drag-and-drop
* Cross-document messaging
* Browser history management
* MIME type and protocol handler registration
View All Answers
Question - 22:
What is the status of the development of the HTML 5 standard?
Ans:
HTML5 is being developed as the next major revision of HTML (HyperText Markup Language), the core markup language of the World Wide Web. The Web
Hypertext Application Technology Working Group (WHATWG) started work on the specification in June 2004 under the name Web Applications 1.0. As of March
2010, the specification is in the Draft Standard state at the WHATWG, and in Working Draft state at the W3C.
View All Answers
In
te
rv
ie
w
Q
ue
st
io
ns
A
ns
w
er
s.
O
R
G
Follow us on FaceBook
www.facebook.com/InterviewQuestionsAnswers.Org
Follow us on Twitter
https://twitter.com/InterviewQA